Evan Cheng
381b094a2b
Another extract_subreg coalescing bug.
...
e.g.
vr1024<2> extract_subreg vr1025, 2
If vr1024 do not have the same register class as vr1025, it's not safe to coalesce this away. For example, vr1024 might be a GPR32 while vr1025 might be a GPR64.
llvm-svn: 50385
2008-04-29 01:41:44 +00:00
Owen Anderson
45b160745b
Add some more comments.
...
llvm-svn: 50384
2008-04-29 00:45:15 +00:00
Owen Anderson
e0f9e8446b
Remove debugging code.
...
llvm-svn: 50383
2008-04-29 00:39:24 +00:00
Owen Anderson
4cc52fd657
Add dead loop elimination, which removes dead loops for which we can compute
...
the trip count.
llvm-svn: 50382
2008-04-29 00:38:34 +00:00
Evan Cheng
8696eb18c1
Add -march=x86.
...
llvm-svn: 50380
2008-04-28 23:31:41 +00:00
Dan Gohman
fa033a0fbd
Update and_ops.ll according to the recent dagcombiner changes.
...
Add a new test, and_ops_more.ll, which is XFAIL'd, to
record the parts of and_ops.ll that were affected by this
change.
llvm-svn: 50379
2008-04-28 23:26:22 +00:00
Evan Cheng
3167c716f2
Test case.
...
llvm-svn: 50377
2008-04-28 22:14:34 +00:00
Evan Cheng
a2e4ffcd8a
Fix a bug in RegsForValue::getCopyToRegs() that causes cyclical scheduling units. If it's creating multiple CopyToReg nodes that are "flagged" together, it should not create a TokenFactor for it's chain outputs:
...
c1, f1 = CopyToReg
c2, f2 = CopyToReg
c3 = TokenFactor c1, c2
...
= user c3, ..., f2
Now that the two CopyToReg's and the user are "flagged" together. They effectively forms a single scheduling unit. The TokenFactor is now both an operand and a successor of the Flagged nodes.
llvm-svn: 50376
2008-04-28 22:07:13 +00:00
Anton Korobeynikov
a2edd9607f
Correct parameter attributes encoding for C bindings.
...
Patch by Anders Johnsen!
llvm-svn: 50375
2008-04-28 21:48:04 +00:00
Anton Korobeynikov
ce2ed94866
Add possibility of using arbitrary to to execute stuff from bugpoint.
...
Patch by Pekka Jääskeläinen!
llvm-svn: 50373
2008-04-28 20:53:48 +00:00
Dan Gohman
e921f90c15
Fix a pointer-arithmetic bug that caused 64-bit host pointer values to
...
be truncated to 32 bits. This fixes the recent Benchmarks/McCat/09-vor
regression on x86-64, among other things.
llvm-svn: 50372
2008-04-28 20:25:15 +00:00
Dan Gohman
9e4db7f0bd
Fix DSE to not eliminate volatile loads with no uses.
...
llvm-svn: 50370
2008-04-28 19:51:27 +00:00
Dale Johannesen
08671c6cac
Don't try to convert PPC long double.
...
llvm-svn: 50369
2008-04-28 19:46:58 +00:00
Dan Gohman
6df962bf9a
Evan pointed out that folding sext to zext may not be correct
...
if the zext is not legal.
llvm-svn: 50368
2008-04-28 18:47:17 +00:00
Dan Gohman
d67d878df0
Delete an unused constructor.
...
llvm-svn: 50367
2008-04-28 18:28:49 +00:00
Dan Gohman
733bb3e992
Add a comment to CreateRegForValue that clarifies the handling of
...
aggregate types.
llvm-svn: 50366
2008-04-28 18:19:43 +00:00
Dan Gohman
2f0476499c
Rewrite the comments for RegsForValue and its members, and
...
reorder some of the members for clarity.
llvm-svn: 50365
2008-04-28 18:10:39 +00:00
Ted Kremenek
fd04109260
Add more alignment enums.
...
llvm-svn: 50363
2008-04-28 17:58:20 +00:00
Ted Kremenek
f1304a3762
Bug fix in BumpPtrAllocator: don't assume that all objects have the same alignment. "Bump" of the pointer for the next allocated object to be of the specified alignment.
...
llvm-svn: 50362
2008-04-28 17:58:07 +00:00
Dan Gohman
5d36cd74b0
Don't call size() on each iteration of the loop.
...
llvm-svn: 50361
2008-04-28 17:42:03 +00:00
Gordon Henriksen
0b2f0d3007
Expose parameter attributes via C bindings.
...
Patch by Anders Johnsen!
llvm-svn: 50360
2008-04-28 17:37:06 +00:00
Dan Gohman
0285c1e9bb
Fix the SVOffset values for loads and stores produced by
...
memcpy/memset expansion. It was a bug for the SVOffset value
to be used in the actual address calculations.
llvm-svn: 50359
2008-04-28 17:15:20 +00:00
Dan Gohman
1b7238e6e4
Teach InstCombine's ComputeMaskedBits what SelectionDAG's
...
ComputeMaskedBits knows about cttz, ctlz, and ctpop. Teach
SelectionDAG's ComputeMaskedBits what InstCombine's knows
about SRem. And teach them both some things about high bits
in Mul, UDiv, URem, and Sub. This allows instcombine and
dagcombine to eliminate sign-extension operations in
several new cases.
llvm-svn: 50358
2008-04-28 17:02:21 +00:00
Dan Gohman
389a3ff9c7
Teach DAGCombine to convert (sext x) to (zext x) when the
...
sign-bit of x is known to be zero.
llvm-svn: 50357
2008-04-28 16:58:24 +00:00
Mikhail Glushenkov
4c358b3125
Add support for response files to the CommandLine library.
...
llvm-svn: 50355
2008-04-28 16:44:25 +00:00
Anton Korobeynikov
54791c2a43
Fix FP return for Win64 ABI
...
llvm-svn: 50342
2008-04-28 07:40:07 +00:00
Chris Lattner
c83326d89f
Another collection of random cleanups. No functionality change.
...
llvm-svn: 50341
2008-04-28 07:16:35 +00:00
Chris Lattner
27fa922841
Remove the SmallVector ctor that converts from a SmallVectorImpl. This
...
conversion open the door for many nasty implicit conversion issues, and
can be easily solved by initializing with (V.begin(), V.end()) when
needed.
This patch includes many small cleanups for sdisel also.
llvm-svn: 50340
2008-04-28 06:44:42 +00:00
Chris Lattner
89339f3a90
restore the copy ctor in SmallVector. This fixes serious
...
errors I introduced in my last patch.
llvm-svn: 50338
2008-04-28 06:32:08 +00:00
Chris Lattner
d6315b68f2
switch RegsForValue::Regs to be a SmallVector to avoid
...
heap thrash on tiny (usually single-element) vectors.
llvm-svn: 50335
2008-04-28 06:02:19 +00:00
Chris Lattner
a03159bc35
generalize SmallVector copy ctor, there is no requirement for
...
the initialization vector to have the same fixed size, just the
same element type.
llvm-svn: 50334
2008-04-28 06:01:06 +00:00
Chris Lattner
ede7e89144
Fix PR2256, yet another miscompilation in simplifycfg of i
...
multiple return values.
Bill, please pull this into Tak.
llvm-svn: 50332
2008-04-28 00:19:07 +00:00
Chris Lattner
0378973e09
several multiple-retval fixes for bugpoint.
...
llvm-svn: 50331
2008-04-28 00:04:58 +00:00
Chris Lattner
459f6ed05c
move static function out of anon namespace, no functionality change.
...
llvm-svn: 50330
2008-04-27 23:48:12 +00:00
Chris Lattner
113de6b3a8
Another step to getting multiple result inline asm to work.
...
llvm-svn: 50329
2008-04-27 23:44:28 +00:00
Chris Lattner
bef7aa1d4b
Allow asms to return multiple results by value.
...
llvm-svn: 50328
2008-04-27 23:33:55 +00:00
Anton Korobeynikov
1c5d228377
Properly lower vararg's FORMAL_ARGUMENTS node on win64
...
llvm-svn: 50325
2008-04-27 23:15:03 +00:00
Anton Korobeynikov
0df1f3bc6c
Handle fp80 for win64
...
llvm-svn: 50324
2008-04-27 22:54:09 +00:00
Bill Wendling
2e2dab8423
Added support for:
...
- defm and multiclass
- imbricatable multiline C style comment
- FIXME/TODO highlight in comment
- binary and hexadecimal number
- code using [{ }] is no highlighted as special (perhaps not the best
choice)
Patch by Cedric Venet!
llvm-svn: 50319
2008-04-27 09:44:10 +00:00
Chris Lattner
0cd8c478f7
typo
...
llvm-svn: 50316
2008-04-27 01:49:46 +00:00
Chris Lattner
39a4281deb
Implement a signficant optimization for inline asm:
...
When choosing between constraints with multiple options,
like "ir", test to see if we can use the 'i' constraint and
go with that if possible. This produces more optimal ASM in
all cases (sparing a register and an instruction to load it),
and fixes inline asm like this:
void test () {
asm volatile (" %c0 %1 " : : "imr" (42), "imr"(14));
}
Previously we would dump "42" into a memory location (which
is ok for the 'm' constraint) which would cause a problem
because the 'c' modifier is not valid on memory operands.
Isn't it great how inline asm turns 'missed optimization'
into 'compile failed'??
Incidentally, this was the todo in
PowerPC/2007-04-24-InlineAsm-I-Modifier.ll
Please do NOT pull this into Tak.
llvm-svn: 50315
2008-04-27 00:37:18 +00:00
Chris Lattner
42aa4f9620
isa+cast -> dyn_cast
...
llvm-svn: 50314
2008-04-27 00:16:18 +00:00
Chris Lattner
b83aaaa855
Move a bunch of inline asm code out of line.
...
llvm-svn: 50313
2008-04-27 00:09:47 +00:00
Chris Lattner
b5bd654163
A few inline asm cleanups:
...
- Make targetlowering.h fit in 80 cols.
- Make LowerAsmOperandForConstraint const.
- Make lowerXConstraint -> LowerXConstraint
- Make LowerXConstraint return a const char* instead of taking a string byref.
llvm-svn: 50312
2008-04-26 23:02:14 +00:00
Chris Lattner
1c98ff80c0
no need to implement this method and just have it call
...
the default impl.
llvm-svn: 50311
2008-04-26 22:59:59 +00:00
Chris Lattner
2798e42a9f
When SRoA'ing a global variable, make sure the new globals get the
...
appropriate alignment. This fixes a miscompilation of 252.eon on
x86-64 (rdar://5891920).
Bill, please pull this into Tak.
llvm-svn: 50308
2008-04-26 07:40:11 +00:00
Nate Begeman
1723f6af2b
Feedback from chris
...
llvm-svn: 50305
2008-04-25 21:47:35 +00:00
Nate Begeman
acd7e1c464
Add a testcase for the recent "handle variable vector insert elt in mem" patch
...
llvm-svn: 50303
2008-04-25 21:26:59 +00:00
Dale Johannesen
cfba8d51b8
change comments per review
...
llvm-svn: 50300
2008-04-25 21:16:07 +00:00
Evan Cheng
db1497fa77
Update tests.
...
llvm-svn: 50293
2008-04-25 20:13:47 +00:00