diff options
author | Michelle McDaniel <adiaaida@gmail.com> | 2016-06-24 14:10:52 -0700 |
---|---|---|
committer | Michelle McDaniel <adiaaida@gmail.com> | 2016-07-29 09:16:39 -0700 |
commit | a1fa8c14cae981369dccf2f361b01959b215ad8f (patch) | |
tree | cfbd2c5020bacd9422a64338f513350057e3cae0 /src/jit/assertionprop.cpp | |
parent | a812669c5737a336745f42c099a1a8a6e1aafa4f (diff) | |
download | coreclr-a1fa8c14cae981369dccf2f361b01959b215ad8f.tar.gz coreclr-a1fa8c14cae981369dccf2f361b01959b215ad8f.tar.bz2 coreclr-a1fa8c14cae981369dccf2f361b01959b215ad8f.zip |
Massage code for clang-format
This change starts the process of updating the jit code to make it ready
for being formatted by clang-format. Changes mostly include reflowing
comments that go past our column limit and moving comments around ifdefs
so clang-format does not modify the indentation. Additionally, some
header files are manually reformatted for pointer alignment and marked
as clang-format off so that we do not lose the current formatting.
Diffstat (limited to 'src/jit/assertionprop.cpp')
-rw-r--r-- | src/jit/assertionprop.cpp | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/jit/assertionprop.cpp b/src/jit/assertionprop.cpp index 1ac1cd285f..055f43c161 100644 --- a/src/jit/assertionprop.cpp +++ b/src/jit/assertionprop.cpp @@ -369,7 +369,8 @@ void Compiler::optAddCopies() // This block will be the new candidate for the insert point // for the new assignment - // + CLANG_FORMAT_COMMENT_ANCHOR; + #ifdef DEBUG if (verbose) printf("new bestBlock\n"); @@ -379,9 +380,10 @@ void Compiler::optAddCopies() bestWeight = block->getBBWeight(this); } - /* If there is a use of the variable in this block */ - /* then we insert the assignment at the beginning */ - /* otherwise we insert the statement at the end */ + // If there is a use of the variable in this block + // then we insert the assignment at the beginning + // otherwise we insert the statement at the end + CLANG_FORMAT_COMMENT_ANCHOR; #ifdef DEBUG if (verbose) @@ -2251,9 +2253,9 @@ GenTreePtr Compiler::optVNConstantPropOnTree(BasicBlock* block, GenTreePtr stmt, #ifdef _TARGET_64BIT_ if (vnStore->IsVNHandle(vnCns)) { +#ifdef RELOC_SUPPORT // Don't perform constant folding that involves a handle that needs // to be recorded as a relocation with the VM. -#ifdef RELOC_SUPPORT if (!opts.compReloc) #endif { @@ -2322,9 +2324,9 @@ GenTreePtr Compiler::optVNConstantPropOnTree(BasicBlock* block, GenTreePtr stmt, #ifndef _TARGET_64BIT_ if (vnStore->IsVNHandle(vnCns)) { +#ifdef RELOC_SUPPORT // Don't perform constant folding that involves a handle that needs // to be recorded as a relocation with the VM. -#ifdef RELOC_SUPPORT if (!opts.compReloc) #endif { @@ -2475,8 +2477,10 @@ GenTreePtr Compiler::optConstantAssertionProp(AssertionDsc* curAssertion, GenTre if (!optLocalAssertionProp) { assert(newTree->OperIsConst()); // We should have a simple Constant node for newTree - assert(vnStore->IsVNConstant(curAssertion->op2.vn)); // The value number stored for op2 should be a valid VN representing the constant - newTree->gtVNPair.SetBoth(curAssertion->op2.vn); // Set the ValueNumPair to the constant VN from op2 of the assertion + assert(vnStore->IsVNConstant(curAssertion->op2.vn)); // The value number stored for op2 should be a valid + // VN representing the constant + newTree->gtVNPair.SetBoth(curAssertion->op2.vn); // Set the ValueNumPair to the constant VN from op2 + // of the assertion } #ifdef DEBUG @@ -2708,8 +2712,8 @@ GenTreePtr Compiler::optAssertionProp_LclVar(ASSERT_VALARG_TP assertions, const * op1Kind and lclNum, op2Kind and the constant value and is either equal or * not equal assertion. */ -Compiler::AssertionIndex Compiler::optLocalAssertionIsEqualOrNotEqual(optOp1Kind op1Kind, unsigned lclNum, optOp2Kind op2Kind, - ssize_t cnsVal, ASSERT_VALARG_TP assertions) +Compiler::AssertionIndex Compiler::optLocalAssertionIsEqualOrNotEqual(optOp1Kind op1Kind, unsigned lclNum, + optOp2Kind op2Kind, ssize_t cnsVal, ASSERT_VALARG_TP assertions) { noway_assert((op1Kind == O1K_LCLVAR) || (op1Kind == O1K_EXACT_TYPE) || (op1Kind == O1K_SUBTYPE)); noway_assert((op2Kind == O2K_CONST_INT) || (op2Kind == O2K_IND_CNS_INT)); |