Skip to content
  1. Feb 01, 2012
    • Stepan Dyatkovskiy's avatar
      SwitchInst refactoring. · 513aaa56
      Stepan Dyatkovskiy authored
      The purpose of refactoring is to hide operand roles from SwitchInst user (programmer). If you want to play with operands directly, probably you will need lower level methods than SwitchInst ones (TerminatorInst or may be User). After this patch we can reorganize SwitchInst operands and successors as we want.
      
      What was done:
      
      1. Changed semantics of index inside the getCaseValue method:
      getCaseValue(0) means "get first case", not a condition. Use getCondition() if you want to resolve the condition. I propose don't mix SwitchInst case indexing with low level indexing (TI successors indexing, User's operands indexing), since it may be dangerous.
      2. By the same reason findCaseValue(ConstantInt*) returns actual number of case value. 0 means first case, not default. If there is no case with given value, ErrorIndex will returned.
      3. Added getCaseSuccessor method. I propose to avoid usage of TerminatorInst::getSuccessor if you want to resolve case successor BB. Use getCaseSuccessor instead, since internal SwitchInst organization of operands/successors is hidden and may be changed in any moment.
      4. Added resolveSuccessorIndex and resolveCaseIndex. The main purpose of these methods is to see how case successors are really mapped in TerminatorInst.
      4.1 "resolveSuccessorIndex" was created if you need to level down from SwitchInst to TerminatorInst. It returns TerminatorInst's successor index for given case successor.
      4.2 "resolveCaseIndex" converts low level successors index to case index that curresponds to the given successor.
      
      Note: There are also related compatability fix patches for dragonegg, klee, llvm-gcc-4.0, llvm-gcc-4.2, safecode, clang.
      llvm-svn: 149481
      513aaa56
    • NAKAMURA Takumi's avatar
    • Hal Finkel's avatar
      A few of the changes suggested in code review (by Nick Lewycky) · 8a3aebe5
      Hal Finkel authored
      llvm-svn: 149472
      8a3aebe5
    • Argyrios Kyrtzidis's avatar
      Revert Chris' commits up to r149348 that started causing VMCoreTests unit test to fail. · 17c981a4
      Argyrios Kyrtzidis authored
      These are:
      
      r149348
      r149351
      r149352
      r149354
      r149356
      r149357
      r149361
      r149362
      r149364
      r149365
      
      llvm-svn: 149470
      17c981a4
    • Hal Finkel's avatar
      Add a basic-block autovectorization pass. · c34e5113
      Hal Finkel authored
      This is the initial checkin of the basic-block autovectorization pass along with some supporting vectorization infrastructure.
      Special thanks to everyone who helped review this code over the last several months (especially Tobias Grosser).
      
      llvm-svn: 149468
      c34e5113
    • Jim Grosbach's avatar
      Disable InstCombine unsafe folding bitcasts of calls w/ varargs. · 9fa04815
      Jim Grosbach authored
      Changing arguments from being passed as fixed to varargs is unsafe, as
      the ABI may require they be handled differently (stack vs. register, for
      example).
      
      Remove two tests which rely on the bitcast being folded into the direct
      call, which is exactly the transformation that's unsafe.
      
      llvm-svn: 149457
      9fa04815
    • Lenny Maiorani's avatar
      bz11794 : EarlyCSE stack overflow on long functions. · 8d670b8f
      Lenny Maiorani authored
      Make the EarlyCSE optimizer not use recursion to do a depth first iteration.
      
      llvm-svn: 149445
      8d670b8f
  2. Jan 31, 2012
  3. Jan 30, 2012
  4. Jan 29, 2012
  5. Jan 28, 2012
  6. Jan 27, 2012
  7. Jan 26, 2012
  8. Jan 25, 2012
  9. Jan 24, 2012
  10. Jan 23, 2012
  11. Jan 20, 2012
    • David Blaikie's avatar
      More dead code removal (using -Wunreachable-code) · 46a9f016
      David Blaikie authored
      llvm-svn: 148578
      46a9f016
    • Andrew Trick's avatar
      Handle a corner case with IV chain collection with bailout instead of assert. · b9c822ab
      Andrew Trick authored
      Fixes PR11783: bad cast to AddRecExpr.
      
      llvm-svn: 148572
      b9c822ab
    • Kostya Serebryany's avatar
      Extend Attributes to 64 bits · a5054ad2
      Kostya Serebryany authored
      Problem: LLVM needs more function attributes than currently available (32 bits).
      One such proposed attribute is "address_safety", which shows that a function is being checked for address safety (by AddressSanitizer, SAFECode, etc).
      
      Solution:
      - extend the Attributes from 32 bits to 64-bits
      - wrap the object into a class so that unsigned is never erroneously used instead
      - change "unsigned" to "Attributes" throughout the code, including one place in clang.
      - the class has no "operator uint64 ()", but it has "uint64_t Raw() " to support packing/unpacking.
      - the class has "safe operator bool()" to support the common idiom:  if (Attributes attr = getAttrs()) useAttrs(attr);
      - The CTOR from uint64_t is marked explicit, so I had to add a few explicit CTOR calls
      - Add the new attribute "address_safety". Doing it in the same commit to check that attributes beyond first 32 bits actually work.
      - Some of the functions from the Attribute namespace are worth moving inside the class, but I'd prefer to have it as a separate commit.
      
      Tested:
      "make check" on Linux (32-bit and 64-bit) and Mac (10.6)
      built/run spec CPU 2006 on Linux with clang -O2.
      
      
      This change will break clang build in lib/CodeGen/CGCall.cpp.
      The following patch will fix it.
      
      llvm-svn: 148553
      a5054ad2
Loading