Scott Michel [Thu, 15 Jan 2009 04:41:47 +0000 (04:41 +0000)]
- 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
Mikhail Glushenkov [Thu, 15 Jan 2009 02:42:40 +0000 (02:42 +0000)]
Some small documentation fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62251
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Thu, 15 Jan 2009 02:04:54 +0000 (02:04 +0000)]
Clarify the documentation a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62249
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 14 Jan 2009 21:01:16 +0000 (21:01 +0000)]
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
Devang Patel [Wed, 14 Jan 2009 20:10:24 +0000 (20:10 +0000)]
xfail for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62243
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Wed, 14 Jan 2009 18:26:46 +0000 (18:26 +0000)]
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
Nuno Lopes [Wed, 14 Jan 2009 17:51:41 +0000 (17:51 +0000)]
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
Gabor Greif [Wed, 14 Jan 2009 17:09:04 +0000 (17:09 +0000)]
minor simplification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62232
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Wed, 14 Jan 2009 02:35:31 +0000 (02:35 +0000)]
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
Mikhail Glushenkov [Wed, 14 Jan 2009 02:02:16 +0000 (02:02 +0000)]
Make -o a prefix option.
Both 'llvmc -o file' and 'llvmc -ofile' should work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62211
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 14 Jan 2009 01:34:32 +0000 (01:34 +0000)]
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
Ted Kremenek [Wed, 14 Jan 2009 00:38:21 +0000 (00:38 +0000)]
Add member template MallocAllocator::Allocate(Num) (to match the same function in BumpPtrAllocator).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62202
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 14 Jan 2009 00:12:58 +0000 (00:12 +0000)]
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
Devang Patel [Tue, 13 Jan 2009 23:54:55 +0000 (23:54 +0000)]
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
Nuno Lopes [Tue, 13 Jan 2009 23:35:49 +0000 (23:35 +0000)]
fix memleaks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62198
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 13 Jan 2009 23:27:15 +0000 (23:27 +0000)]
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
Dan Gohman [Tue, 13 Jan 2009 23:25:30 +0000 (23:25 +0000)]
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
Dan Gohman [Tue, 13 Jan 2009 23:23:30 +0000 (23:23 +0000)]
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
Devang Patel [Tue, 13 Jan 2009 23:02:17 +0000 (23:02 +0000)]
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
Devang Patel [Tue, 13 Jan 2009 22:54:57 +0000 (22:54 +0000)]
Undo previous checkin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62190
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Tue, 13 Jan 2009 22:43:37 +0000 (22:43 +0000)]
Fix testsuite regressions from recursive inlining.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62189
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 13 Jan 2009 21:44:10 +0000 (21:44 +0000)]
Use DwarfWriter to record dbg variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62185
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 13 Jan 2009 21:25:00 +0000 (21:25 +0000)]
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
Dan Gohman [Tue, 13 Jan 2009 20:33:23 +0000 (20:33 +0000)]
Add bt instructions that take immediate operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62180
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 13 Jan 2009 20:32:45 +0000 (20:32 +0000)]
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
Dan Gohman [Tue, 13 Jan 2009 20:25:24 +0000 (20:25 +0000)]
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
Dan Gohman [Tue, 13 Jan 2009 20:24:13 +0000 (20:24 +0000)]
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
Dan Gohman [Tue, 13 Jan 2009 20:18:38 +0000 (20:18 +0000)]
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
Sanjiv Gupta [Tue, 13 Jan 2009 19:18:47 +0000 (19:18 +0000)]
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
Dan Gohman [Tue, 13 Jan 2009 19:08:45 +0000 (19:08 +0000)]
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
Duncan Sands [Tue, 13 Jan 2009 15:17:14 +0000 (15:17 +0000)]
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
Duncan Sands [Tue, 13 Jan 2009 15:15:46 +0000 (15:15 +0000)]
Mark this XFAIL for the moment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62168
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 13 Jan 2009 14:42:39 +0000 (14:42 +0000)]
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
Duncan Sands [Tue, 13 Jan 2009 14:04:14 +0000 (14:04 +0000)]
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
Duncan Sands [Tue, 13 Jan 2009 13:48:44 +0000 (13:48 +0000)]
Correct a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62165
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 13 Jan 2009 09:18:58 +0000 (09:18 +0000)]
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
Chris Lattner [Tue, 13 Jan 2009 07:43:51 +0000 (07:43 +0000)]
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
Chris Lattner [Tue, 13 Jan 2009 07:22:22 +0000 (07:22 +0000)]
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
Evan Cheng [Tue, 13 Jan 2009 06:08:37 +0000 (06:08 +0000)]
Un-tabify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62151
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 13 Jan 2009 06:05:10 +0000 (06:05 +0000)]
Fix fallout from r62144. Evan, please double check this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62150
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 13 Jan 2009 03:57:45 +0000 (03:57 +0000)]
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
Devang Patel [Tue, 13 Jan 2009 00:35:13 +0000 (00:35 +0000)]
Use DebugInfo interface to lower dbg_* intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62127
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 13 Jan 2009 00:32:17 +0000 (00:32 +0000)]
Use DebugInfo interface to lower dbg_* intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62126
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 13 Jan 2009 00:20:51 +0000 (00:20 +0000)]
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
Dan Gohman [Mon, 12 Jan 2009 23:12:39 +0000 (23:12 +0000)]
Document several current CodeGen limitations in LangRef.html.
Patches for any of these are welcome!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62120
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 12 Jan 2009 23:09:42 +0000 (23:09 +0000)]
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
Devang Patel [Mon, 12 Jan 2009 23:05:55 +0000 (23:05 +0000)]
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
Devang Patel [Mon, 12 Jan 2009 22:58:14 +0000 (22:58 +0000)]
Avoid cast<>, use light weith wrapper directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62115
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 12 Jan 2009 22:54:42 +0000 (22:54 +0000)]
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
Dale Johannesen [Mon, 12 Jan 2009 22:11:50 +0000 (22:11 +0000)]
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
Devang Patel [Mon, 12 Jan 2009 21:38:43 +0000 (21:38 +0000)]
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
Dan Gohman [Mon, 12 Jan 2009 21:35:55 +0000 (21:35 +0000)]
The LLVM Assembly Language Reference incorrectly stated that the
prefix used for dll{import,export} is _imp__; it is actually __imp_.
Patch by Mahadevan R!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62103
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 12 Jan 2009 21:29:24 +0000 (21:29 +0000)]
Fix the instructions to work even when PATH does not contain ".".
Thanks to Martin Geisse for pointing this out!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62102
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 12 Jan 2009 20:38:59 +0000 (20:38 +0000)]
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
Devang Patel [Mon, 12 Jan 2009 19:17:34 +0000 (19:17 +0000)]
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
Chris Lattner [Mon, 12 Jan 2009 19:02:50 +0000 (19:02 +0000)]
remove some dead options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62095
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 12 Jan 2009 18:48:36 +0000 (18:48 +0000)]
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
Devang Patel [Mon, 12 Jan 2009 18:41:00 +0000 (18:41 +0000)]
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
Rafael Espindola [Mon, 12 Jan 2009 15:53:25 +0000 (15:53 +0000)]
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
Evan Cheng [Mon, 12 Jan 2009 08:05:54 +0000 (08:05 +0000)]
Second test is only valid in 32-bit mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62084
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 12 Jan 2009 03:46:55 +0000 (03:46 +0000)]
Test for r62076.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62077
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 12 Jan 2009 03:19:55 +0000 (03:19 +0000)]
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
Owen Anderson [Mon, 12 Jan 2009 03:10:40 +0000 (03:10 +0000)]
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
Chris Lattner [Mon, 12 Jan 2009 02:41:37 +0000 (02:41 +0000)]
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
Chris Lattner [Mon, 12 Jan 2009 01:27:55 +0000 (01:27 +0000)]
add scaffolding to emit argument attributes. No functionality
change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62067
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 12 Jan 2009 01:18:58 +0000 (01:18 +0000)]
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
Chris Lattner [Mon, 12 Jan 2009 01:12:03 +0000 (01:12 +0000)]
add nocapture attribute to llvm.mem* intrinsics and have tblgen
parse them. tblgen doesn't yet do anything with this info though.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62065
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Sun, 11 Jan 2009 23:11:00 +0000 (23:11 +0000)]
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
Gabor Greif [Sun, 11 Jan 2009 22:39:04 +0000 (22:39 +0000)]
drats! remove tabs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62056
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Sun, 11 Jan 2009 22:33:22 +0000 (22:33 +0000)]
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
Chris Lattner [Sun, 11 Jan 2009 20:53:49 +0000 (20:53 +0000)]
Implement PR3313, and while I'm at it address a very FAQ.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62048
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 11 Jan 2009 20:41:36 +0000 (20:41 +0000)]
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
Chris Lattner [Sun, 11 Jan 2009 20:23:52 +0000 (20:23 +0000)]
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
Chris Lattner [Sun, 11 Jan 2009 20:15:20 +0000 (20:15 +0000)]
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
Nick Lewycky [Sun, 11 Jan 2009 17:02:06 +0000 (17:02 +0000)]
Use the spiffy new getAlignmentFromAttrs function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62039
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sun, 11 Jan 2009 08:53:35 +0000 (08:53 +0000)]
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
Bill Wendling [Sun, 11 Jan 2009 01:25:51 +0000 (01:25 +0000)]
Fix naming of file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62035
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sun, 11 Jan 2009 00:40:00 +0000 (00:40 +0000)]
Fix the example syntax for named sections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62033
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 10 Jan 2009 19:06:32 +0000 (19:06 +0000)]
This is a dup of pr2659.ll.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62029
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 10 Jan 2009 12:56:31 +0000 (12:56 +0000)]
Adding unittests for SmallVector. Test by Talin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62025
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 10 Jan 2009 03:33:22 +0000 (03:33 +0000)]
80 col violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62024
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Sat, 10 Jan 2009 02:42:49 +0000 (02:42 +0000)]
Reduce initial small vector sizes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62023
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Sat, 10 Jan 2009 02:34:18 +0000 (02:34 +0000)]
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
Evan Cheng [Fri, 9 Jan 2009 22:44:02 +0000 (22:44 +0000)]
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
Evan Cheng [Fri, 9 Jan 2009 21:01:31 +0000 (21:01 +0000)]
Add test case from PR2659.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62006
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 9 Jan 2009 20:42:34 +0000 (20:42 +0000)]
Minor debug output tweak.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62005
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Fri, 9 Jan 2009 19:46:41 +0000 (19:46 +0000)]
This has been replaced by llvm/utils/lint/cpp_lint.py, which is more
comprehensive and can support more complex style analysis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62002
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Fri, 9 Jan 2009 19:25:42 +0000 (19:25 +0000)]
Removed trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62000
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 9 Jan 2009 19:11:50 +0000 (19:11 +0000)]
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
Chris Lattner [Fri, 9 Jan 2009 18:31:39 +0000 (18:31 +0000)]
fix typo Duncan noticed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61997
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 9 Jan 2009 18:18:43 +0000 (18:18 +0000)]
Fix PR3304
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61995
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Fri, 9 Jan 2009 16:44:42 +0000 (16:44 +0000)]
Removed trailing whitespace from Makefiles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61991
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Fri, 9 Jan 2009 16:31:01 +0000 (16:31 +0000)]
Support llvmc plugins in out-of-tree projects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61990
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Fri, 9 Jan 2009 16:16:27 +0000 (16:16 +0000)]
Add a --check-graph option to llvmc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61989
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 9 Jan 2009 08:16:12 +0000 (08:16 +0000)]
PR2659 was fixed by r61847. Add the testcase as a regression test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61986
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 9 Jan 2009 07:47:06 +0000 (07:47 +0000)]
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
Chris Lattner [Fri, 9 Jan 2009 07:10:58 +0000 (07:10 +0000)]
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
Chris Lattner [Fri, 9 Jan 2009 06:08:12 +0000 (06:08 +0000)]
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
Chris Lattner [Fri, 9 Jan 2009 05:49:27 +0000 (05:49 +0000)]
this doesn't depend on the gcc early inliner anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61982
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 9 Jan 2009 05:46:19 +0000 (05:46 +0000)]
PR3290 is now fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61981
91177308-0d34-0410-b5e6-
96231b3b80d8