Commit Graph

74522 Commits

Author SHA1 Message Date
Rafael Espindola 96df560ce1 print st_type with the correct number of bits.
llvm-svn: 136875
2011-08-04 15:24:00 +00:00
Rafael Espindola 79ef75dc49 Print st_bind with the correct number of bits.
llvm-svn: 136874
2011-08-04 15:10:35 +00:00
Rafael Espindola 1848231ad1 Print r_sym with the correct number of bits.
llvm-svn: 136873
2011-08-04 14:48:27 +00:00
Rafael Espindola 260af5cef6 Print r_type with the correct number of bits.
llvm-svn: 136872
2011-08-04 14:39:30 +00:00
Rafael Espindola 1b282e7e49 Another counter goes decimal.
llvm-svn: 136871
2011-08-04 14:27:46 +00:00
Rafael Espindola 65c559c5fb Change anther counter to decimal.
llvm-svn: 136870
2011-08-04 14:01:03 +00:00
Rafael Espindola cad9e7f094 Don't print a counter in hex.
llvm-svn: 136869
2011-08-04 13:39:15 +00:00
Rafael Espindola d7facaf371 Add an assert to check that the Addend fits the file format.
llvm-svn: 136868
2011-08-04 13:05:26 +00:00
Rafael Espindola 69c67d3b18 Print all the bits in the addend.
llvm-svn: 136867
2011-08-04 13:00:24 +00:00
Jay Foad 2755e07e1e Reword.
llvm-svn: 136866
2011-08-04 10:43:43 +00:00
Duncan Sands 020c1947b7 Fix what seems an obvious typo. Patch by Ivan Krasin. Problem
reported at http://habrahabr.ru/blogs/compilers/125626/.

llvm-svn: 136865
2011-08-04 10:02:21 +00:00
Andrew Trick bc673fb5f2 Reverting r136884 updateUnloop, which crashed a linux builder.
llvm-svn: 136857
2011-08-04 01:04:37 +00:00
Jason W Kim e4df09f7ba Fix http://llvm.org/bugs/show_bug.cgi?id=10568
Move the reloc size assert into AsmBackend - where it is more apropos.

llvm-svn: 136855
2011-08-04 00:38:45 +00:00
Bill Wendling e234f6ae0c Only access both operands of an INSERT_SUBVECTOR if it is an INSERT_SUBVECTOR.
Fixes PR10527.

llvm-svn: 136853
2011-08-04 00:32:58 +00:00
Jim Grosbach d359571120 ARM refactoring assembly parsing of memory address operands.
Memory operand parsing is a bit haphazzard at the moment, in no small part
due to the even more haphazzard representations of memory operands in the .td
files. Start cleaning that all up, at least a bit.

The addressing modes in the .td files will be being simplified to not be
so monolithic, especially with regards to immediate vs. register offsets
and post-indexed addressing. addrmode3 is on its way with this patch, for
example.

This patch is foundational to enable going back to smaller incremental patches
for the individual memory referencing instructions themselves. It does just
enough to get the basics in place and handle the "make check" regression tests
we already have.

Follow-up work will be fleshing out the details and adding more robust test
cases for the individual instructions, starting with ARM mode and moving from
there into Thumb and Thumb2.

llvm-svn: 136845
2011-08-03 23:50:40 +00:00
Andrew Trick 468eadbbb2 An algorithm for incrementally updating LoopInfo within a
LoopPassManager. The incremental update should be extremely cheap in
most cases and can be used in places where it's not feasible to
regenerate the entire loop forest.

- "Unloop" is a node in the loop tree whose last backedge has been removed.
- Perform reverse dataflow on the block inside Unloop to propagate the
  nearest loop from the block's successors.
- For reducible CFG, each block in unloop is visited exactly
  once. This is because unloop no longer has a backedge and blocks
  within subloops don't change parents.
- Immediate subloops are summarized by the nearest loop reachable from
  their exits or exits within nested subloops.
- At completion the unloop blocks each have a new parent loop, and
  each immediate subloop has a new parent.

llvm-svn: 136844
2011-08-03 23:50:25 +00:00
Andrew Trick f898cbde5e whitespace
llvm-svn: 136843
2011-08-03 23:45:50 +00:00
Jakob Stoklund Olesen 2539af600a Correctly handle multiple DBG_VALUE instructions at the same SlotIndex.
It is possible to have multiple DBG_VALUEs for the same variable:

32L TEST32rr %vreg0<kill>, %vreg0, %EFLAGS<imp-def>; GR32:%vreg0
    DBG_VALUE 2, 0, !"i"
    DBG_VALUE %noreg, %0, !"i"

When that happens, keep the last one instead of the first.

llvm-svn: 136842
2011-08-03 23:44:31 +00:00
Andrew Trick dec3dddc7e whitespace
llvm-svn: 136840
2011-08-03 23:43:49 +00:00
Andrew Trick 41dfb50c22 An interface for iterating over a loop's blocks in DFS order.
llvm-svn: 136838
2011-08-03 23:27:28 +00:00
Owen Anderson 7bc3b11a56 Fix broken encoding of tCBNZ.
llvm-svn: 136837
2011-08-03 23:21:48 +00:00
Jakob Stoklund Olesen 11b788d5be Enable compact region splitting by default.
This helps generate better code in functions with high register
pressure.

The previous version of compact region splitting caused regressions
because the regions were a bit too large. A stronger negative bias
applied in r136832 fixed this problem.

llvm-svn: 136836
2011-08-03 23:16:09 +00:00
Devang Patel aab841cf63 Do not drop undef debug values. These are used as range termination marker by live debug variable pass.
llvm-svn: 136834
2011-08-03 23:13:55 +00:00
Benjamin Kramer 3c7e9ee480 Remove underscore that's breaking linux buildbots.
llvm-svn: 136833
2011-08-03 23:13:01 +00:00
Jakob Stoklund Olesen 869545203b Be more conservative when forming compact regions.
Apply twice the negative bias on transparent blocks when computing the
compact regions. This excludes loop backedges from the region when only
one of the loop blocks uses the register.

Previously, we would include the backedge in the region if the loop
preheader and the loop latch both used the register, but the loop header
didn't.

When both the header and latch blocks use the register, we still keep it
live on the backedge.

llvm-svn: 136832
2011-08-03 23:09:38 +00:00
Chandler Carruth 77eb5a0a37 Fix some warnings from Clang in release builds:
lib/CodeGen/RegAllocGreedy.cpp:1176:18: warning: unused variable 'B' [-Wunused-variable]
    if (unsigned B = Cand.getBundles(BundleCand, BestCand)) {
                 ^
lib/CodeGen/RegAllocGreedy.cpp:1188:18: warning: unused variable 'B' [-Wunused-variable]
    if (unsigned B = Cand.getBundles(BundleCand, 0)) {
                 ^

llvm-svn: 136831
2011-08-03 23:07:27 +00:00
Jakub Staszak 3ef20e35f9 Fix typo in #include which revealed in the case-sensitive filesystem.
llvm-svn: 136828
2011-08-03 22:53:41 +00:00
Jakub Staszak 15e5b742ad Use MachineBranchProbabilityInfo in If-Conversion instead of its own heuristics.
llvm-svn: 136826
2011-08-03 22:34:43 +00:00
Bill Wendling 2d3138c112 Remove the LowerSetJmp pass. It wasn't used effectively by any of the targets.
This is some of my original LLVM code. *wipes tear*

llvm-svn: 136821
2011-08-03 22:18:20 +00:00
Owen Anderson c7b50c765d Add accessors for manipulating an MCInst's operands.
llvm-svn: 136818
2011-08-03 21:52:15 +00:00
Jakub Staszak a60d130f26 Add more constantness in BlockFrequencyInfo.
llvm-svn: 136816
2011-08-03 21:30:57 +00:00
Evan Cheng bbb1d7a095 Kill the export list as well.
llvm-svn: 136814
2011-08-03 21:07:01 +00:00
Eli Friedman 30a49e93e3 New approach to r136737: insert the necessary fences for atomic ops in platform-independent code, since a bunch of platforms (ARM, Mips, PPC, Alpha are the relevant targets here) need to do essentially the same thing.
I think this completes the basic CodeGen for atomicrmw and cmpxchg.

llvm-svn: 136813
2011-08-03 21:06:02 +00:00
Bill Wendling edcfd1e876 Remove CreateUnwind from the IRBuillder.
llvm-svn: 136811
2011-08-03 20:53:38 +00:00
Benjamin Kramer 103e2ec2df Remove unused variables.
llvm-svn: 136803
2011-08-03 19:53:48 +00:00
Bob Wilson 0a8d5c6047 Some revisions to Devang's change r136759 for merged global debug info.
llvm-svn: 136802
2011-08-03 19:42:51 +00:00
Bill Wendling c5a136103b Go back to the old definition. It's not clear that a 'resume' can be 'outlined' from the function with the landing pad for all platforms.
llvm-svn: 136799
2011-08-03 18:37:32 +00:00
Andrew Trick bf69d03382 SCEV: Use AssertingVH to catch dangling BasicBlock* when passes forget
to notify SCEV of a change. Add forgetLoop in a couple of those places.

llvm-svn: 136797
2011-08-03 18:32:11 +00:00
Andrew Trick 9d8c2af257 whitespace
llvm-svn: 136795
2011-08-03 18:28:21 +00:00
Bill Wendling 0524b8d1f4 Explain how clauses are applied.
llvm-svn: 136790
2011-08-03 17:17:06 +00:00
Jakob Stoklund Olesen da618420ee Handle IMPLICIT_DEF instructions in X86FloatingPoint.
This fixes PR10575.

llvm-svn: 136787
2011-08-03 16:33:19 +00:00
Jay Foad 24a01962af Use cast<> instead of a C-style cast to get some free assertions.
llvm-svn: 136771
2011-08-03 10:05:04 +00:00
Chris Lattner 5b82a0ac0c fix PR10286, a problem with the .ll printer handling block addresses that are out-of-scope.
llvm-svn: 136768
2011-08-03 06:15:41 +00:00
Devang Patel dc9cbaaf23 Use byte offset, instead of element number, to access merged global.
llvm-svn: 136759
2011-08-03 01:25:46 +00:00
Nick Lewycky d405b7e2ae Small cleanups:
- use SmallVectorImpl& for the function argument.
  - ignore the operands on the GEP, even if they aren't constant! Much as we
    pretend the malloc succeeds, we pretend that malloc + whatever-you-GEP'd-by
    is not null. It's magic!

llvm-svn: 136757
2011-08-03 01:11:40 +00:00
Bill Wendling 035ea32870 Add this back in for now. There are still a few passes which create unwind instructions at the moment.
llvm-svn: 136756
2011-08-03 01:07:57 +00:00
Nick Lewycky 50f4966ceb Fix logical error when detecting lifetime intrinsics.
Don't replace a gep/bitcast with 'undef' because that will form a "free(undef)"
which in turn means "unreachable". What we wanted was a no-op. Instead, analyze
the whole tree and look for all the instructions we need to delete first, then
delete them second, not relying on the use_list to stay consistent.

llvm-svn: 136752
2011-08-03 00:43:35 +00:00
Bill Wendling ae3380faff Replace the 'UnwindInst' check with a check for 'ResumeInst', which also exits
the function, because the UnwindInst is going away.

llvm-svn: 136751
2011-08-03 00:30:19 +00:00
Jakob Stoklund Olesen 3c14505164 Use the precomputed def presence in RAGreedy::calcSpillCost.
llvm-svn: 136742
2011-08-02 23:04:08 +00:00
Jakob Stoklund Olesen 057f9b68de Inform SpillPlacement about blocks with defs.
This information is not used for anything yet.

llvm-svn: 136741
2011-08-02 23:04:06 +00:00