Skip to content
  1. Oct 18, 2012
    • Chandler Carruth's avatar
      Introduce a BarrierNoop pass, a hack designed to allow *some* control · e8479e15
      Chandler Carruth authored
      over the implicitly-formed-and-nesting CGSCC pass manager and function
      pass managers, especially when using them on the opt commandline or
      using extension points in the module builder. The '-barrier' opt flag
      (or the pass itself) will create a no-op module pass in the pipeline,
      resetting the pass manager stack, and allowing the creation of a new
      pipeline of function passes or CGSCC passes to be created that is
      independent from any previous pipelines.
      
      For example, this can be used to test running two CGSCC passes in
      independent CGSCC pass managers as opposed to in the same CGSCC pass
      manager. It also allows us to introduce a further hack into the
      PassManagerBuilder to separate the O0 pipeline extension passes from the
      always-inliner's CGSCC pass manager, which they likely do not want to
      participate in... At the very least none of the Sanitizer passes want
      this behavior.
      
      This fixes a bug with ASan at O0 currently, and I'll commit the ASan
      test which covers this pass. I'm happy to add a test case that this pass
      exists and works, but not sure how much time folks would like me to
      spend adding test cases for the details of its behavior of partition
      pass managers.... The whole thing is just vile, and mostly intended to
      unblock ASan, so I'm hoping to rip this all out in a brave new pass
      manager world.
      
      llvm-svn: 166172
      e8479e15
    • Nadav Rotem's avatar
      remove unused variable to fix a warning. · 7a172809
      Nadav Rotem authored
      llvm-svn: 166170
      7a172809
    • Bob Wilson's avatar
      Temporarily revert the TargetTransform changes. · d6d9ccca
      Bob Wilson authored
      The TargetTransform changes are breaking LTO bootstraps of clang.  I am
      working with Nadav to figure out the problem, but I am reverting it for now
      to get our buildbots working.
      
      This reverts svn commits: 165665 165669 165670 165786 165787 165997
      and I have also reverted clang svn 165741
      
      llvm-svn: 166168
      d6d9ccca
    • Nadav Rotem's avatar
      Remove the use of dominators and AA. · 642efbcd
      Nadav Rotem authored
      llvm-svn: 166167
      642efbcd
    • Nadav Rotem's avatar
      Vectorizer: Add support for loops with an unknown count. For example: · b52f7174
      Nadav Rotem authored
           for (i=0; i<n; i++){
              a[i] = b[i+1] + c[i+3];
           }
      
      llvm-svn: 166165
      b52f7174
    • NAKAMURA Takumi's avatar
      LoopVectorize.cpp: Fix a warning. [-Wunused-variable] · 78574157
      NAKAMURA Takumi authored
      llvm-svn: 166153
      78574157
    • Jakub Staszak's avatar
      Remove redundant SetInsertPoint call. · 68e5dfdd
      Jakub Staszak authored
      llvm-svn: 166138
      68e5dfdd
  2. Oct 17, 2012
  3. Oct 16, 2012
  4. Oct 15, 2012
    • Bill Wendling's avatar
      Move the Attributes::Builder outside of the Attributes class and into its own... · 50d27849
      Bill Wendling authored
      Move the Attributes::Builder outside of the Attributes class and into its own class named AttrBuilder. No functionality change.
      
      llvm-svn: 165960
      50d27849
    • Micah Villmow's avatar
      Resubmit the changes to llvm core to update the functions to support different... · 4bb926d9
      Micah Villmow authored
      Resubmit the changes to llvm core to update the functions to support different pointer sizes on a per address space basis.
      
      llvm-svn: 165941
      4bb926d9
    • Kostya Serebryany's avatar
      [asan] make AddressSanitizer to be a FunctionPass instead of ModulePass. This... · b0e2506d
      Kostya Serebryany authored
      [asan] make AddressSanitizer to be a FunctionPass instead of ModulePass. This will simplify chaining other FunctionPasses with asan. Also some minor cleanup 
      
      llvm-svn: 165936
      b0e2506d
    • Chandler Carruth's avatar
      Update the memcpy rewriting to fully support widened int rewriting. This · 49c8eea3
      Chandler Carruth authored
      includes extracting ints for copying elsewhere and inserting ints when
      copying into the alloca. This should fix the CanSROA assertion coming
      out of Clang's regression test suite.
      
      llvm-svn: 165931
      49c8eea3
    • Chandler Carruth's avatar
      Follow-up fix to r165928: handle memset rewriting for widened integers, · 9d966a20
      Chandler Carruth authored
      and generally clean up the memset handling. It had rotted a bit as the
      other rewriting logic got polished more.
      
      llvm-svn: 165930
      9d966a20
    • Chandler Carruth's avatar
      First major step toward addressing PR14059. This teaches SROA to handle · 435c4e07
      Chandler Carruth authored
      cases where we have partial integer loads and stores to an otherwise
      promotable alloca to widen[1] those loads and stores to cover the entire
      alloca and bitcast them into the appropriate type such that promotion
      can proceed.
      
      These partial loads and stores stem from an annoying confluence of ARM's
      calling convention and ABI lowering and the FCA pre-splitting which
      takes place in SROA. Clang lowers a { double, double } in-register
      function argument as a [4 x i32] function argument to ensure it is
      placed into integer 32-bit registers (a really unnerving implicit
      contract between Clang and the ARM backend I would add). This results in
      a FCA load of [4 x i32]* from the { double, double } alloca, and SROA
      decomposes this into a sequence of i32 loads and stores. Inlining
      proceeds, code gets folded, but at the end of the day, we still have i32
      stores to the low and high halves of a double alloca. Widening these to
      be i64 operations, and bitcasting them to double prior to loading or
      storing allows promotion to proceed for these allocas.
      
      I looked quite a bit changing the IR which Clang produces for this case
      to be more friendly, but small changes seem unlikely to help. I think
      the best representation we could use currently would be to pass 4 i32
      arguments thereby avoiding any FCAs, but that would still require this
      fix. It seems like it might eventually be nice to somehow encode the ABI
      register selection choices outside of the parameter type system so that
      the parameter can be a { double, double }, but the CC register
      annotations indicate that this should be passed via 4 integer registers.
      
      This patch does not address the second problem in PR14059, which is the
      reverse: when a struct alloca is loaded as a *larger* single integer.
      
      This patch also does not address some of the code quality issues with
      the FCA-splitting. Those don't actually impede any optimizations really,
      but they're on my list to clean up.
      
      [1]: Pedantic footnote: for those concerned about memory model issues
      here, this is safe. For the alloca to be promotable, it cannot escape or
      have any use of its address that could allow these loads or stores to be
      racing. Thus, widening is always safe.
      
      llvm-svn: 165928
      435c4e07
    • Chandler Carruth's avatar
      Hoist the canConvertValue predicate and the convertValue transform out · aa6afbb8
      Chandler Carruth authored
      into static helper functions. They're really quite generic and are going
      to be needed elsewhere shortly.
      
      llvm-svn: 165927
      aa6afbb8
    • Bill Wendling's avatar
      Add an enum for the return and function indexes into the AttrListPtr object.... · fbd38fe2
      Bill Wendling authored
      Add an enum for the return and function indexes into the AttrListPtr object. This gets rid of some magic numbers.
      
      llvm-svn: 165924
      fbd38fe2
    • Bill Wendling's avatar
      Attributes Rewrite · d079a446
      Bill Wendling authored
      Convert the internal representation of the Attributes class into a pointer to an
      opaque object that's uniqued by and stored in the LLVMContext object. The
      Attributes class then becomes a thin wrapper around this opaque
      object. Eventually, the internal representation will be expanded to include
      attributes that represent code generation options, etc.
      
      llvm-svn: 165917
      d079a446
    • Meador Inge's avatar
      instcombine: Migrate strcmp and strncmp optimizations · 40b6fac3
      Meador Inge authored
      This patch migrates the strcmp and strncmp optimizations from the
      simplify-libcalls pass into the instcombine library call simplifier.
      
      llvm-svn: 165915
      40b6fac3
  5. Oct 14, 2012
  6. Oct 13, 2012
    • Benjamin Kramer's avatar
      Remove unused private field. · 44e58f9e
      Benjamin Kramer authored
      llvm-svn: 165881
      44e58f9e
    • Meador Inge's avatar
      instcombine: Migrate strchr and strrchr optimizations · 17418508
      Meador Inge authored
      This patch migrates the strchr and strrchr optimizations from the
      simplify-libcalls pass into the instcombine library call simplifier.
      
      llvm-svn: 165875
      17418508
    • Meador Inge's avatar
      instcombine: Migrate strcat and strncat optimizations · 7fb2f737
      Meador Inge authored
      This patch migrates the strcat and strncat optimizations from the
      simplify-libcalls pass into the instcombine library call simplifier.
      
      llvm-svn: 165874
      7fb2f737
    • Meador Inge's avatar
      Implement new LibCallSimplifier class · df796f89
      Meador Inge authored
      This patch implements the new LibCallSimplifier class as outlined in [1].
      In addition to providing the new base library simplification infrastructure,
      all the fortified library call simplifications were moved over to the new
      infrastructure.  The rest of the library simplification optimizations will
      be moved over with follow up patches.
      
      NOTE: The original fortified library call simplifier located in the
      SimplifyFortifiedLibCalls class was not removed because it is still
      used by CodeGenPrepare.  This class will eventually go away too.
      
      [1] http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-August/052283.html
      
      llvm-svn: 165873
      df796f89
    • Chandler Carruth's avatar
      Teach SROA to cope with wrapper aggregates. These show up a lot in ABI · ba931992
      Chandler Carruth authored
      type coercion code, especially when targetting ARM. Things like [1
      x i32] instead of i32 are very common there.
      
      The goal of this logic is to ensure that when we are picking an alloca
      type, we look through such wrapper aggregates and across any zero-length
      aggregate elements to find the simplest type possible to form a type
      partition.
      
      This logic should (generally speaking) rarely fire. It only ends up
      kicking in when an alloca is accessed using two different types (for
      instance, i32 and float), and the underlying alloca type has wrapper
      aggregates around it. I noticed a significant amount of this occurring
      looking at stepanov_abstraction generated code for arm, and suspect it
      happens elsewhere as well.
      
      Note that this doesn't yet address truly heinous IR productions such as
      PR14059 is concerning. Those result in mismatched *sizes* of types in
      addition to mismatched access and alloca types.
      
      llvm-svn: 165870
      ba931992
Loading