Skip to content
  1. Oct 31, 2013
    • Rafael Espindola's avatar
      Use LTO_SYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDEN instead of the "dso list". · 282a4703
      Rafael Espindola authored
      There are two ways one could implement hiding of linkonce_odr symbols in LTO:
      * LLVM tells the linker which symbols can be hidden if not used from native
        files.
      * The linker tells LLVM which symbols are not used from other object files,
        but will be put in the dso symbol table if present.
      
      GOLD's API is the second option. It was implemented almost 1:1 in llvm by
      passing the list down to internalize.
      
      LLVM already had partial support for the first option. It is also very similar
      to how ld64 handles hiding these symbols when *not* doing LTO.
      
      This patch then
      * removes the APIs for the DSO list.
      * marks LTO_SYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDEN all linkonce_odr unnamed_addr
        global values and other linkonce_odr whose address is not used.
      * makes the gold plugin responsible for handling the API mismatch.
      
      llvm-svn: 193800
      282a4703
    • Rafael Espindola's avatar
      Merge CallGraph and BasicCallGraph. · 6554e5a9
      Rafael Espindola authored
      llvm-svn: 193734
      6554e5a9
  2. Oct 30, 2013
  3. Oct 29, 2013
  4. Oct 27, 2013
  5. Oct 26, 2013
    • Wan Xiaofei's avatar
      Quick look-up for block in loop. · be640b28
      Wan Xiaofei authored
      This patch implements quick look-up for block in loop by maintaining a hash set for blocks.
      It improves the efficiency of loop analysis a lot, the biggest improvement could be 5-6%(458.sjeng).
      Below are the compilation time for our benchmark in llc before & after the patch.
      
      Benchmark	llc - trunk		llc - patched	
      401.bzip2	0.339081	100.00%	0.329657	102.86%
      403.gcc		19.853966	100.00%	19.605466	101.27%
      429.mcf		0.049823	100.00%	0.048451	102.83%
      433.milc	0.514898	100.00%	0.510217	100.92%
      444.namd	1.109328	100.00%	1.103481	100.53%
      445.gobmk	4.988028	100.00%	4.929114	101.20%
      456.hmmer	0.843871	100.00%	0.825865	102.18%
      458.sjeng	0.754238	100.00%	0.714095	105.62%
      464.h264ref	2.9668		100.00%	2.90612		102.09%
      471.omnetpp	4.556533	100.00%	4.511886	100.99%
      bitmnp01	0.038168	100.00%	0.0357		106.91%
      idctrn01	0.037745	100.00%	0.037332	101.11%
      libquake2	3.78689		100.00%	3.76209		100.66%
      libquake_	2.251525	100.00%	2.234104	100.78%
      linpack		0.033159	100.00%	0.032788	101.13%
      matrix01	0.045319	100.00%	0.043497	104.19%
      nbench		0.333161	100.00%	0.329799	101.02%
      tblook01	0.017863	100.00%	0.017666	101.12%
      ttsprk01	0.054337	100.00%	0.053057	102.41%
      
      Reviewer	: Andrew Trick <atrick@apple.com>, Hal Finkel <hfinkel@anl.gov>
      Approver	: Andrew Trick <atrick@apple.com>
      Test		: Pass make check-all & llvm test-suite
      
      llvm-svn: 193460
      be640b28
  6. Oct 25, 2013
    • Andrew Trick's avatar
      Fix SCEVExpander: don't try to expand quadratic recurrences outside a loop. · 57243da7
      Andrew Trick authored
      Partial fix for PR17459: wrong code at -O3 on x86_64-linux-gnu
      (affecting trunk and 3.3)
      
      When SCEV expands a recurrence outside of a loop it attempts to scale
      by the stride of the recurrence. Chained recurrences don't work that
      way. We could compute binomial coefficients, but would hve to
      guarantee that the chained AddRec's are in a perfectly reduced form.
      
      llvm-svn: 193438
      57243da7
    • Rafael Espindola's avatar
      Handle calls and invokes in GlobalStatus. · 7749d7cc
      Rafael Espindola authored
      This patch teaches GlobalStatus to analyze a call that uses the global value as
      a callee, not as an argument.
      
      With this change internalize call handle the common use of linkonce_odr
      functions. This reduces the number of linkonce_odr functions in a LTO build of
      clang (checked with the emit-llvm gold plugin option) from 1730 to 60.
      
      llvm-svn: 193436
      7749d7cc
    • Hal Finkel's avatar
      LoopVectorizer: Don't attempt to vectorize extractelement instructions · 02f562df
      Hal Finkel authored
      The loop vectorizer does not currently understand how to vectorize
      extractelement instructions. The existing check, which excluded all
      vector-valued instructions, did not catch extractelement instructions because
      it checked only the return value. As a result, vectorization would proceed,
      producing illegal instructions like this:
      
        %58 = extractelement <2 x i32> %15, i32 0
        %59 = extractelement i32 %58, i32 0
      
      where the second extractelement is illegal because its first operand is not a vector.
      
      llvm-svn: 193434
      02f562df
  7. Oct 24, 2013
  8. Oct 23, 2013
  9. Oct 22, 2013
  10. Oct 21, 2013
  11. Oct 20, 2013
    • Michael Gottesman's avatar
      Teach simplify-cfg how to correctly create covered lookup tables for switches on iN with N >= 3. · c024f325
      Michael Gottesman authored
      One optimization simplify-cfg performs is the converting of switches to
      lookup tables if the switch has > 4 cases. This is done by:
      
      1. Finding the max/min case value and calculating the switch case range.
      2. Create a lookup table basic block.
      3. Perform a check in the switch's BB to see if the input value is in
      the switch's case range. If the input value satisfies said predicate
      branch to the lookup table BB, otherwise branch to the switch's default
      destination BB using the default value as the result.
      
      The conditional check consists of subtracting the min case value of the
      table from any input iN value and then ensuring that said value is
      unsigned less than the size of the lookup table represented as an iN
      value.
      
      If the lookup table is a covered lookup table, the size of the table will be N
      which is 0 as an iN value. Thus the comparison will be an `icmp ult` of an iN
      value against 0 which is always false yielding the incorrect result.
      
      This patch fixes this problem by recognizing if we have a covered lookup table
      and if we do, unconditionally jumps to the lookup table BB since the covering
      property of the lookup table implies no input values could not be handled by
      said BB.
      
      rdar://15268442
      
      llvm-svn: 193045
      c024f325
  12. Oct 19, 2013
  13. Oct 17, 2013
  14. Oct 16, 2013
  15. Oct 15, 2013
  16. Oct 14, 2013
Loading