Commit Graph

26756 Commits

Author SHA1 Message Date
Evan Cheng
bdfc582edf ARMCompilationCallback should not save / restore vfp registers if vfp is not available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62299 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-16 02:16:37 +00:00
Devang Patel
5be935536f Validate debug info values only if DwarfDebug is initialized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62298 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-16 02:15:14 +00:00
Evan Cheng
4e56ab2cf4 Clean up previous cast optimization a bit. Also make zext elimination a bit more aggressive: if it's not necessary to emit an AND (i.e. high bits are already zero), it's profitable to evaluate the operand at a different type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62297 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-16 02:11:43 +00:00
Devang Patel
61c6bf37ef Any debug info symbol is only valid if atleast one compile unit is seen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62294 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-16 01:49:46 +00:00
Dan Gohman
2836c283bb Initial hazard recognizer support in post-pass scheduling. This includes
a new toy hazard recognizier heuristic which attempts to direct the
scheduler to avoid clumping large groups of loads or stores too densely.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62291 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-16 01:33:36 +00:00
Devang Patel
153745cc1f Do not stumble over forward declared struct member.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62288 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-16 00:50:53 +00:00
Devang Patel
cf3a4487c0 Validate dbg_* intrinsics before lowering them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62286 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-15 23:41:32 +00:00
Mon P Wang
fa9c5eac33 Added missing support to widen an operand from a bit convert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62285 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-15 22:43:38 +00:00
Dan Gohman
fc54c55296 Generalize the HazardRecognizer interface so that it can be used
to support MachineInstr-based scheduling in addition to
SDNode-based scheduling.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62284 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-15 22:18:12 +00:00
Dan Gohman
c475c3608a Simplify the MachineLICM pass by having it only traverse outer
loops, hoisting instructions all the way out in one step rather
than hoisting them one nest level at a time. Also, make a few
other code simplifications. This speeds up MachineLICM
by several fold.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62283 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-15 22:01:38 +00:00
Rafael Espindola
19caec79f2 Fix Alpha test and support for private linkage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62282 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-15 21:51:46 +00:00
Mon P Wang
f0fcdd8e26 Expand insert/extract of a <4 x i32> with a variable index.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62281 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-15 21:10:20 +00:00
Rafael Espindola
bb46f52027 Add the private linkage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62279 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-15 20:18:42 +00:00
Devang Patel
f193ff0590 Use lightweight DebugInfo objects directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62276 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-15 19:26:23 +00:00
Dan Gohman
79ce276083 Move a few containers out of ScheduleDAGInstrs::BuildSchedGraph
and into the ScheduleDAGInstrs class, so that they don't get
destructed and re-constructed for each block. This fixes a
compile-time hot spot in the post-pass scheduler.

To help facilitate this, tidy and do some minor reorganization
in the scheduler constructor functions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62275 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-15 19:20:50 +00:00
Nuno Lopes
6ad2b2a3d2 add comment to explain my previous commit, as asked by Chris
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62272 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-15 18:40:57 +00:00
Gabor Greif
c478e52bf4 avoid using iterators when they get invalidated potentially
this fixes PR3332

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62271 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-15 18:40:09 +00:00
Devang Patel
0e5200f3fd Use variable's context to identify respective DbgScope.
Use light weight DebugInfo object directly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62269 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-15 18:25:17 +00:00
Dan Gohman
41b762a75e Add load-folding table entries for BT*ri8 instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62267 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-15 17:57:09 +00:00
Dan Gohman
65b7f27bb7 Make getWidenVectorType const; this file was missed in the
previous commit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62266 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-15 17:39:39 +00:00
Dan Gohman
c13cf130c4 Make getWidenVectorType const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62265 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-15 17:34:08 +00:00
Evan Cheng
661d9c35b0 Eliminate a redundant check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62264 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-15 17:09:07 +00:00
Evan Cheng
f35fd547ac - Teach CanEvaluateInDifferentType of this xform: sext (zext ty1), ty2 -> zext ty2
- Looking at the number of sign bits of the a sext instruction to determine  whether new trunc + sext pair should be added when its source is being evaluated in a different type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62263 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-15 17:01:23 +00:00
Dan Gohman
e9530ecae4 More consts on TargetLowering references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62262 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-15 16:58:17 +00:00
Dan Gohman
0d137d7f35 Use const with TargetLowering references in a few more places.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62260 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-15 16:43:02 +00:00
Dan Gohman
73e0914848 Const-qualify getPreIndexedAddressParts and friends.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62259 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-15 16:29:45 +00:00
Richard Osborne
cfb1ae87c6 Don't fold address calculations which use negative offsets into
the ADDRspii addressing mode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62258 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-15 11:32:30 +00:00
Richard Osborne
62db116933 Update the operands used when building LDAWSP instructions to match the .td
changes in the last commit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62257 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-15 11:18:53 +00:00
Gabor Greif
b67e6b3b65 minor refactoring: use a more specific API
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62256 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-15 11:10:44 +00:00
Scott Michel
94bd57e154 - Convert remaining i64 custom lowering into custom instruction emission
sequences in SPUDAGToDAGISel.cpp and SPU64InstrInfo.td, killing custom
  DAG node types as needed.
- i64 mul is now a legal instruction, but emits an instruction sequence
  that stretches tblgen and the imagination, as well as violating laws of
  several small countries and most southern US states (just kidding, but
  looking at a function with 80+ parameters is really weird and just plain
  wrong.)
- Update tests as needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62254 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-15 04:41:47 +00:00
Chris Lattner
d9d46241ec Fix PR3325, a miscompilation of invokes by IPSCCP. Patch by Jay Foad!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62244 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-14 21:01:16 +00:00
Richard Osborne
29cab5f0ee Add pseudo instructions to the XCore for (load|store|load address) of a
frame index. eliminateFrameIndex will replace these instructions with
(LDWSP|STWSP|LDAWSP) or (LDW|STW|LDAWF) if a frame pointer is in use.

This fixes PR 3324. Previously we used LDWSP, STWSP, LDAWSP before frame
pointer elimination. However since they were marked as implicitly using
SP they could not be rematerialised.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62238 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-14 18:26:46 +00:00
Nuno Lopes
a8c78a9e89 fix crash in the case when some arg is null
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62236 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-14 17:51:41 +00:00
Gabor Greif
6104626b46 minor simplification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62232 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-14 17:09:04 +00:00
Dale Johannesen
2f46bb8178 Fix the time regression I introduced in 464.h264ref with
my earlier patch to this file.

The issue there was that all uses of an IV inside a loop
are actually references to Base[IV*2], and there was one
use outside that was the same but LSR didn't see the base
or the scaling because it didn't recurse into uses outside
the loop; thus, it used base+IV*scale mode inside the loop
instead of pulling base out of the loop.  This was extra bad
because register pressure later forced both base and IV into
memory.  Doing that recursion, at least enough
to figure out addressing modes, is a good idea in general;
the change in AddUsersIfInteresting does this.  However,
there were side effects....

It is also possible for recursing outside the loop to
introduce another IV where there was only 1 before (if
the refs inside are not scaled and the ref outside is).
I don't think this is a common case, but it's in the testsuite.
It is right to be very aggressive about getting rid of
such introduced IVs (CheckForIVReuse and the handling of
nonzero RewriteFactor in StrengthReduceStridedIVUsers).
In the testcase in question the new IV produced this way
has both a nonconstant stride and a nonzero base, neither
of which was handled before.  And when inserting 
new code that feeds into a PHI, it's right to put such 
code at the original location rather than in the PHI's 
immediate predecessor(s) when the original location is outside 
the loop (a case that couldn't happen before)
(RewriteInstructionToUseNewBase); better to avoid making
multiple copies of it in this case.

Also, the mechanism for keeping SCEV's corresponding to GEP's
no longer works, as the GEP might change after its SCEV
is remembered, invalidating the SCEV, and we might get a bad
SCEV value when looking up the GEP again for a later loop.  
This also couldn't happen before, as we weren't recursing
into GEP's outside the loop.

Also, when we build an expression that involves a (possibly
non-affine) IV from a different loop as well as an IV from
the one we're interested in (containsAddRecFromDifferentLoop),
don't recurse into that.  We can't do much with it and will
get in trouble if we try to create new non-affine IVs or something.

More testcases are coming.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62212 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-14 02:35:31 +00:00
Devang Patel
4548d97399 Do not construct debug scope if RootScope *is* null.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62209 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-14 01:34:32 +00:00
Chris Lattner
92c6bd2c45 rewrite OptimizeAwayTrappingUsesOfLoads to 1) avoid a temporary
vector and extraneous loop over it, 2) not delete globals used by
phis/selects etc which could actually be useful.  This fixes PR3321.
Many thanks to Duncan for narrowing this down.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62201 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-14 00:12:58 +00:00
Devang Patel
bbdc8207d5 Removoe MachineModuleInfo methods (and related DebugInfoDesc class hierarchy) that were used to handle debug info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62199 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-13 23:54:55 +00:00
Nuno Lopes
bb6382e32d fix memleaks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62198 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-13 23:35:49 +00:00
Dan Gohman
0746392cc2 BT appears to be available on all >= i386 chips.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62196 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-13 23:27:15 +00:00
Dan Gohman
286575c65c Don't use a BT instruction if the AND has multiple uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62195 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-13 23:25:30 +00:00
Dan Gohman
f31408d75c Disable the register+memory forms of the bt instructions for now. Thanks
to Eli for pointing out that these forms don't ignore the high bits of
their index operands, and as such are not immediately suitable for use
by isel.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62194 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-13 23:23:30 +00:00
Devang Patel
e2051627b8 Keep "has debug info" big in MachineModuleInfo to avoid circular dependency between AsmPrinter and CodeGen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62191 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-13 23:02:17 +00:00
Devang Patel
35fe7344ae Undo previous checkin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62190 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-13 22:54:57 +00:00
Dale Johannesen
39fa32403e Fix testsuite regressions from recursive inlining.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62189 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-13 22:43:37 +00:00
Devang Patel
c48c550e13 Use DwarfWriter to record dbg variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62185 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-13 21:44:10 +00:00
Devang Patel
bb8c5959c8 Use dwarf writer to decide whether the module has debug info or not.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62184 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-13 21:25:00 +00:00
Dan Gohman
4afe15b131 Add bt instructions that take immediate operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62180 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-13 20:33:23 +00:00
Dan Gohman
0c89b7e61e Fix a few more JIT encoding issues in the BT instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62179 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-13 20:32:45 +00:00
Dan Gohman
fd246e5f84 Use assertions to check for conditions that should never happen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62178 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-13 20:25:24 +00:00
Dan Gohman
bc0b56732a The list-td and list-tdrr schedulers don't yet support physreg
scheduling dependencies. Add assertion checks to help catch
this.

It appears the Mips target defaults to list-td, and it has a
regression test that uses a physreg dependence. Such code was
liable to be miscompiled, and now evokes an assertion failure.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62177 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-13 20:24:13 +00:00
Dan Gohman
6893cd7615 Make instcombine ensure that all allocas are explicitly aligned at at
least their preferred alignment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62176 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-13 20:18:38 +00:00
Sanjiv Gupta
1b04694116 Checking in conditionals, function call, arrays and libcalls implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62174 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-13 19:18:47 +00:00
Dan Gohman
a1f50e2c2c Avoid referring to edge D after the Succs or Preds arrays have
been modified, to avoid trouble in the (unlikely) scenario that
D is a reference to an element in one of those arrays.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62173 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-13 19:08:45 +00:00
Duncan Sands
2ecf88d175 When replacing uses and the same node is reached
via two paths, process it once not twice, d'oh!
Analysis, testcase and original patch thanks to
Mon Ping Wang.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62169 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-13 15:17:14 +00:00
Duncan Sands
1bec3dd28a Fix some typos. Also, the WidenedVectors map
was not being cleaned by ExpungeNode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62167 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-13 14:42:39 +00:00
Duncan Sands
042fb3199f Correct a comment - this is not a sign extension.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62166 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-13 14:04:14 +00:00
Duncan Sands
b502440164 Correct a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62165 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-13 13:48:44 +00:00
Nick Lewycky
789558db70 Wind SCEV back in time, to Nov 18th. This 'fixes' PR3275, PR3294, PR3295,
PR3296 and PR3302.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62160 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-13 09:18:58 +00:00
Chris Lattner
3ff704fa2b add a new insertAfter method, patch by Tom Jablin!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62158 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-13 07:43:51 +00:00
Chris Lattner
acca9559f4 make -march=cpp handle the nocapture attribute, make it assert if it
sees attributes it doesn't know.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62155 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-13 07:22:22 +00:00
Evan Cheng
167650d411 Un-tabify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62151 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-13 06:08:37 +00:00
Evan Cheng
1d8a76d7d5 FIX llvm-gcc bootstrap on x86_64 linux. If a virtual register is copied to a physical register, it's not necessarily defined by a copy. We have to watch out it doesn't clobber any sub-register that might be live during its live interval. If the live interval crosses a basic block, then it's not safe to check with the less conservative check (by scanning uses and defs) because it's possible a sub-register might be live out of the block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62144 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-13 03:57:45 +00:00
Devang Patel
83489bb770 Use DebugInfo interface to lower dbg_* intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62127 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-13 00:35:13 +00:00
Devang Patel
7bb89ed33c Start using DebugInfo API to emit debug info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62125 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-13 00:20:51 +00:00
Devang Patel
3f7833a273 Emit debug info, only if at least one compile unit is seen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62118 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-12 23:09:42 +00:00
Devang Patel
72b663575f If multiple compile units are seen then emit them independently. In other words, do not force all DIEs into first, whatever it is, compile unit.
Note, multiple compile unit support is not well tested (it did not work correctly until now anyway.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62116 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-12 23:05:55 +00:00
Devang Patel
f6bac3e4bd Avoid cast<>, use light weith wrapper directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62115 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-12 22:58:14 +00:00
Devang Patel
f3ee514419 Use SrcLineInfo from DwarfWriter. The MachineModuleInfo copy will disappear soon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62114 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-12 22:54:42 +00:00
Dale Johannesen
cbfdf9644c Enable recursive inlining. Reduce inlining threshold
back to 200; 400 seems to be too high, loses more than
it gains.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62107 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-12 22:11:50 +00:00
Devang Patel
486938f7a1 Add classof() methods to support isa<> and other related facilities.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62104 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-12 21:38:43 +00:00
Duncan Sands
ceb4d1aecb Rename getABITypeSize to getTypePaddedSize, as
suggested by Chris.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62099 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-12 20:38:59 +00:00
Devang Patel
ccca7fe6a3 Add DwarfWriter interface to mainipulate source location info.
( May be this info should be directly handled by the dwarf writer ? )


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62096 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-12 19:17:34 +00:00
Devang Patel
481ff5be9d Clear debug info at the end of function processing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62092 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-12 18:48:36 +00:00
Devang Patel
e9bfb0feca There is no need to maintain separate labelid list in the dwarf writer. It is not a good idea.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62090 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-12 18:41:00 +00:00
Rafael Espindola
c775ea1376 Remove some dead code from the days llvm had type planes.
There might be more dead code, but with llvm-gcc bootstrap broken on linux x86-64 it is had to test :-(



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62088 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-12 15:53:25 +00:00
Evan Cheng
c29a56dedb Fix PR3241: Currently EmitCopyFromReg emits a copy from the physical register to a virtual register unless it requires an expensive cross class copy. That means we are only treating "expensive to copy" register dependency as physical register dependency.
Also future proof the scheduler to handle "normal" physical register dependencies. The code is not exercised yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62074 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-12 03:19:55 +00:00
Owen Anderson
e1762c9826 More two-address fixes. This gets lua working with join-creation enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62073 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-12 03:10:40 +00:00
Chris Lattner
d4a2700fdc make tblgen autogenerate the nocapture intrinsics for
llvm.memcpy/memset/memmove.  This allows removal of some 
hackish code from basicaa.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62071 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-12 02:41:37 +00:00
Chris Lattner
048ffb239c make tblgen emit the entire Intrinsic::getAttributes method,
not a random piece of it.  No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62066 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-12 01:18:58 +00:00
Dale Johannesen
c344371854 Increase default inlining aggressiveness in partial
compensation for turning off gcc's inliner.  This gets
us closer to the amount of inlining we were getting before.
It is not a win on everything, of course, but seems to
gain overall.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62058 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-11 23:11:00 +00:00
Gabor Greif
255b26ea35 simplify CallSite helper class to not consult the Instruction's
opcode on each delegation.
Instead the information is cached on construction and the cached flag used thereafter.
Introduced two predicates: isCall and isInvoke.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62055 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-11 22:33:22 +00:00
Chris Lattner
31a69cb9ae Duncan is nervous about undefinedness of % with negatives. I'm
not thrilled about 64-bit % in general, so rewrite to use * instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62047 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-11 20:41:36 +00:00
Chris Lattner
1c412d9ce4 do not generated GEPs into vectors where they don't already exist.
We should treat vectors as atomic types, not like arrays.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62046 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-11 20:23:52 +00:00
Chris Lattner
dbc3bc2585 Make a couple of cleanups to the instcombine bitcast/gep
canonicalization transform based on duncan's comments:

1) improve the comment about %.
2) within our index loop make sure the offset stays 
   within the *type size*, instead of within the *abi size*.
   This allows us to reason explicitly about landing in tail
   padding and means that issues like non-zero offsets into
   [0 x foo] types don't occur anymore.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62045 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-11 20:15:20 +00:00
Nick Lewycky
1ed86d74a8 Use the spiffy new getAlignmentFromAttrs function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62039 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-11 17:02:06 +00:00
Evan Cheng
9aacec1f26 CheckForPhysRegDependency should not return copy cost. It's not used. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62036 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-11 08:53:35 +00:00
Evan Cheng
f2accb5c9e 80 col violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62024 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-10 03:33:22 +00:00
Devang Patel
9795da5aa8 Reduce initial small vector sizes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62023 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-10 02:42:49 +00:00
Devang Patel
0dc969e1ab Fix thinko. Create parent scope if parent descriptor is *not* null.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62022 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-10 02:34:18 +00:00
Evan Cheng
5c3c5a4d9c Duplicated node may produce a non-physical register def.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62015 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-09 22:44:02 +00:00
Evan Cheng
84036a77a3 Minor debug output tweak.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62005 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-09 20:42:34 +00:00
Devang Patel
6e7a1617ac Request DwarfWriter. This will be used to handle dbg_* intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61999 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-09 19:11:50 +00:00
Chris Lattner
ed78f431ed fix typo Duncan noticed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61997 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-09 18:31:39 +00:00
Chris Lattner
583dd6072e Fix PR3304
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61995 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-09 18:18:43 +00:00
Misha Brukman
9b8f542e27 Removed trailing whitespace from Makefiles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61991 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-09 16:44:42 +00:00
Chris Lattner
a80d668215 Implement rdar://6480391, extending of equality icmp's to avoid a truncation.
I noticed this in the code compiled for a routine using std::map, which produced
this code:
	%25 = tail call i32 @memcmp(i8* %24, i8* %23, i32 6) nounwind readonly
	%.lobit.i = lshr i32 %25, 31		; <i32> [#uses=1]
	%tmp.i = trunc i32 %.lobit.i to i8		; <i8> [#uses=1]
	%toBool = icmp eq i8 %tmp.i, 0		; <i1> [#uses=1]
	br i1 %toBool, label %bb3, label %bb4
which compiled to:

	call	L_memcmp$stub
	shrl	$31, %eax
	testb	%al, %al
	jne	LBB1_11	## 

with this change, we compile it to:

	call	L_memcmp$stub
	testl	%eax, %eax
	js	LBB1_11

This triggers all the time in common code, with patters like this:

	%169 = and i32 %ply, 1		; <i32> [#uses=1]
	%170 = trunc i32 %169 to i8		; <i8> [#uses=1]
	%toBool = icmp ne i8 %170, 0		; <i1> [#uses=1]

 	%7 = lshr i32 %6, 24		; <i32> [#uses=1]
	%9 = trunc i32 %7 to i8		; <i8> [#uses=1]
	%10 = icmp ne i8 %9, 0		; <i1> [#uses=1]

etc



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61985 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-09 07:47:06 +00:00
Chris Lattner
6d6b410698 Remove some old code that looks like a remanant from signed-types days.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61984 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-09 07:10:58 +00:00
Chris Lattner
2a99b482a6 Fix PR3298, a crash in Jump Threading. Apparently even
jump threading can have bugs, who knew? ;-)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61983 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-09 06:08:12 +00:00
Chris Lattner
46cd5a13e5 Fix part 3/2 of PR3290, making instcombine zap (gep(bitcast)) when possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61980 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-09 05:44:56 +00:00