David Goodwin
d2f9c044c0
Fix dependencies added to model memory aliasing for post-RA scheduling. The dependencies were overly conservative for memory access that are known not to alias.
...
llvm-svn: 86580
2009-11-09 19:22:17 +00:00
Dan Gohman
c74bc28297
The inbounds keyword isn't relevant to overindexing of
...
static array types. Thanks to Duncan for pointing this out!
llvm-svn: 86576
2009-11-09 19:01:53 +00:00
Dan Gohman
f324dd65f8
Fix a comment in a typo that Duncan noticed.
...
llvm-svn: 86575
2009-11-09 18:59:22 +00:00
Dan Gohman
66c4d61010
Remove the "special case" for zero-length arrays, and rephrase this
...
paragraph to be more precise.
llvm-svn: 86572
2009-11-09 18:40:39 +00:00
Dan Gohman
c146c78060
Generalize LCSSA to handle loops with exits with predecessors outside
...
the loop. This is needed because with indirectbr it may not be possible
for LoopSimplify to guarantee that all loop exit predecessors are
inside the loop. This fixes PR5437.
LCCSA no longer actually requires LoopSimplify form, but for now it
must still have the dependency because the PassManager doesn't know
how to schedule LoopSimplify otherwise.
llvm-svn: 86569
2009-11-09 18:28:24 +00:00
Dan Gohman
85b5bf833e
Fix an 80-column violation.
...
llvm-svn: 86567
2009-11-09 18:20:38 +00:00
Dan Gohman
5196e415ad
Minor tidiness fixes.
...
llvm-svn: 86565
2009-11-09 18:19:43 +00:00
Dan Gohman
6f67f8902a
Constify MachineFunctionAnalysis' TargetMachine reference.
...
llvm-svn: 86564
2009-11-09 18:18:49 +00:00
Dan Gohman
968ecd9888
Fix a comment.
...
llvm-svn: 86558
2009-11-09 17:06:51 +00:00
Dan Gohman
1c311a8cd7
Suppress implicit copy ctor and copy assignment for MachineFunction.
...
llvm-svn: 86557
2009-11-09 17:06:23 +00:00
Daniel Dunbar
3488819495
Use ',' separation in XFAILs, lit doesn't evaluate them as regexs (easy to add,
...
but might as well use the more standard syntax).
llvm-svn: 86553
2009-11-09 16:38:15 +00:00
Nuno Lopes
640eb70bee
add zextOrTrunc and sextOrTrunc methods, that are similar to the ones in APInt
...
llvm-svn: 86549
2009-11-09 15:36:28 +00:00
Jim Grosbach
ad95414c26
Work around assembler not recognizing #0.0 form immediate for vmcp
...
llvm-svn: 86548
2009-11-09 15:27:51 +00:00
Oscar Fuentes
de8f431edf
CMake: Detect gv, circo, twopi, neato, fdo, dot and dotty.
...
Patch by Arnaud Allard de Grandmaison!
llvm-svn: 86547
2009-11-09 15:26:40 +00:00
Xerxes Ranby
7c16a89ebf
Make lib/Support/Debug.cpp SetCurrentDebugType implementation part of llvm namespace to match function declaration in Debug.h.
...
llvm-svn: 86544
2009-11-09 14:50:34 +00:00
Bruno Cardoso Lopes
8dd7c54a42
Fix PR5149.
...
http://llvm.org/bugs/show_bug.cgi?id=5149
llvm-svn: 86543
2009-11-09 14:27:49 +00:00
Chris Lattner
2156c22b3c
make this handle redefinition of malloc with different prototype correctly.
...
llvm-svn: 86525
2009-11-09 07:12:01 +00:00
Chris Lattner
39c07b2eef
if a 'with overflow' intrinsic just has the normal result used, simplify
...
it to a normal binop. Patch by Alastair Lynn, testcase by me.
llvm-svn: 86524
2009-11-09 07:07:56 +00:00
Evan Cheng
ad7c6124e7
Hide a couple of options.
...
llvm-svn: 86522
2009-11-09 06:49:37 +00:00
Evan Cheng
ce29331e10
80 col.
...
llvm-svn: 86521
2009-11-09 06:49:22 +00:00
Chris Lattner
feeabde753
fix PR5104: when printing a single character, return the result of
...
putchar in case there is an error.
llvm-svn: 86515
2009-11-09 04:57:04 +00:00
Chris Lattner
077166e3fa
fix some bogus asserts, PR5049
...
llvm-svn: 86514
2009-11-09 04:47:27 +00:00
Chris Lattner
d1c4e75750
random tidy
...
llvm-svn: 86511
2009-11-09 04:18:23 +00:00
Chris Lattner
275dd8b0af
remove a redundant printout, LinkInArchive prints this as well.
...
llvm-svn: 86510
2009-11-09 04:15:28 +00:00
Chris Lattner
0685be3441
enhance PHI slicing to handle the case when a slicable PHI is begin
...
used by a chain of other PHIs.
llvm-svn: 86503
2009-11-09 01:38:00 +00:00
Owen Anderson
939ea35244
Small cleanups.
...
llvm-svn: 86499
2009-11-09 00:48:15 +00:00
Owen Anderson
73fc616838
Revert my previous patch to ABCD and fix things the right way. There are two problems addressed
...
here:
1) We need to avoid processing sigma nodes as phi nodes for constraint generation.
2) We need to generate constraints for comparisons against constants properly.
This includes our first working ABCD test!
llvm-svn: 86498
2009-11-09 00:44:44 +00:00
Chris Lattner
ea465e221e
comment typos pointed out by Duncan
...
llvm-svn: 86497
2009-11-09 00:41:49 +00:00
Jim Grosbach
d7cf55cd0e
Use Unified Assembly Syntax for the ARM backend.
...
llvm-svn: 86494
2009-11-09 00:11:35 +00:00
Owen Anderson
058088f219
Fix an issue where the ordering of blocks within a function could lead to different constraint
...
graphs being produced. The cause was that we were incorrectly marking sigma instructions as
processed after handling the sigma-specific constraints for them, potentially neglecting to
process them as normal instructions as well.
Unfortunately, the testcase that inspired this still doesn't work because of a bug in the solver,
which is next on the list to debug.
llvm-svn: 86486
2009-11-08 22:36:55 +00:00
Daniel Dunbar
2edf3a4896
Add a 'zkill' script, which is more-or-less a fancy (although not necessarily
...
very robust) version of killall. Because I like making shiny new wheels out of
spare parts.
For use by buildbots when people insist on making cc1 infinite loop. :)
llvm-svn: 86484
2009-11-08 21:51:53 +00:00
Chris Lattner
2299d4b6d8
Teach an instcombine to not pull trunc instructions through PHI nodes
...
when both the source and dest are illegal types, since it would cause
the phi to grow (for example, we shouldn't transform test14b's phi to
a phi on i320). This fixes an infinite loop on i686 bootstrap with
phi slicing turned on, so turn it back on.
llvm-svn: 86483
2009-11-08 21:20:06 +00:00
Duncan Sands
fec62f0ef5
Revert commit 81144, and add a comment. It caused bugpoint timeouts
...
not to work any more on linux.
llvm-svn: 86481
2009-11-08 20:55:48 +00:00
Chris Lattner
a837e4db6b
reapply r8644[3-5] with only the scary part
...
(SliceUpIllegalIntegerPHI) disabled.
llvm-svn: 86480
2009-11-08 19:23:30 +00:00
Daniel Dunbar
4c41373c56
Speculatively revert r8644[3-5], they seem to be leading to infinite loops in
...
llvm-gcc bootstrap.
llvm-svn: 86478
2009-11-08 17:52:47 +00:00
Anton Korobeynikov
700c4ab3f9
Add and-not (bic) patterns. Based heavily on patch by Brian Lucas!
...
llvm-svn: 86471
2009-11-08 15:33:12 +00:00
Anton Korobeynikov
e92c508764
Move OR patterns upper to all logical stuff. No functionality change.
...
llvm-svn: 86470
2009-11-08 15:32:44 +00:00
Anton Korobeynikov
a404d61c8e
Some nice peephole patterns. Based on patch by Brian Lucas!
...
llvm-svn: 86469
2009-11-08 15:32:28 +00:00
Anton Korobeynikov
fd9a893cab
Print tab before operand of jcc
...
llvm-svn: 86468
2009-11-08 15:32:11 +00:00
Anton Korobeynikov
4ca8d3a6a6
Fix invalid operand updates & implement post-inc memory operands
...
llvm-svn: 86466
2009-11-08 14:27:38 +00:00
Anton Korobeynikov
eb8692cff9
Throw an error when stack realignment stuff fails instead of silent
...
code miscompilation
llvm-svn: 86463
2009-11-08 12:58:40 +00:00
Anton Korobeynikov
dc2beaa05e
It is invalid to infer the value type from the result #0 of the node
...
since the instruction might use the other result of different type.
llvm-svn: 86462
2009-11-08 12:14:54 +00:00
Daniel Dunbar
dc3fcfc0d0
Remove ByteswapSCANFResults, it is dead.
...
llvm-svn: 86458
2009-11-08 09:46:57 +00:00
Daniel Dunbar
e34c1d8b44
NNT: Remove DejaGNU test from NewNightlyTest reports, this aspect of testing is
...
handled by buildbots now.
llvm-svn: 86454
2009-11-08 09:34:14 +00:00
Daniel Dunbar
e9bbafe1eb
Two small fixes for site.exp for cmake.
...
llvm-svn: 86453
2009-11-08 09:29:52 +00:00
Daniel Dunbar
84bc8c3058
Derive the right paths to use during testing instead of passing it in via make.
...
Also, fix a few other details of the cmake test target and rename it to
'check'. CMake tests now work for the most part, but there are a handful of
failures left due to missing site.exp bits.
llvm-svn: 86452
2009-11-08 09:08:00 +00:00
Daniel Dunbar
0ab04bc27e
Switch to using 'lit.site.cfg.in' for the site config template for Unit tests,
...
and generate it for CMake builds as well.
llvm-svn: 86451
2009-11-08 09:07:51 +00:00
Daniel Dunbar
bf7afbaaaf
Cleanup some unused RUN lines.
...
llvm-svn: 86450
2009-11-08 09:07:42 +00:00
Daniel Dunbar
42c19ee140
lit: Hardcode whence seek value, os.SEEK_END isn't always available.
...
llvm-svn: 86449
2009-11-08 09:07:33 +00:00
Daniel Dunbar
3d861af58a
lit: Warn when a test suite contains no tests.
...
llvm-svn: 86448
2009-11-08 09:07:26 +00:00
Daniel Dunbar
6ff773bd21
lit: Drop require_and_and support.
...
llvm-svn: 86447
2009-11-08 09:07:13 +00:00
Lang Hames
09eeeaf08b
Moved some ManagedStatics out of the SlotIndexes header.
...
llvm-svn: 86446
2009-11-08 08:49:59 +00:00
Chris Lattner
99db7963b4
another more interesting test.
...
llvm-svn: 86445
2009-11-08 08:36:40 +00:00
Chris Lattner
7c8b29ef61
feature test for the new transformation in r86443
...
llvm-svn: 86444
2009-11-08 08:30:58 +00:00
Chris Lattner
c7a450b5b2
teach a couple of instcombine transformations involving PHIs to
...
not turn a PHI in a legal type into a PHI of an illegal type, and
add a new optimization that breaks up insane integer PHI nodes into
small pieces (PR3451).
llvm-svn: 86443
2009-11-08 08:21:13 +00:00
Nick Lewycky
e0e20c2b90
We don't need to byteswap, the interpreter assumes the program is running
...
native anyways. This fixes a crash using %d and similar in a scanf statement.
llvm-svn: 86440
2009-11-08 05:45:04 +00:00
Daniel Dunbar
80ec848944
lit: Workaround a Win32/subprocess bug when appending.
...
llvm-svn: 86437
2009-11-08 03:43:06 +00:00
Daniel Dunbar
107a38dafc
lit: Preserve the PATHEXT variable when running subcommands, this is important on Win32
...
llvm-svn: 86436
2009-11-08 03:35:19 +00:00
Chris Lattner
295f266370
Make TargetData::getStringRepresentation spit out native integer types,
...
this gives llvm-gcc generated modules the right data.
llvm-svn: 86435
2009-11-08 02:32:01 +00:00
Nick Lewycky
1866ee143d
Remove test. Execution tests are slow and generally not worth it.
...
llvm-svn: 86434
2009-11-08 02:23:15 +00:00
Nick Lewycky
fcd45392ad
Fix run line.
...
llvm-svn: 86429
2009-11-08 01:04:45 +00:00
Nick Lewycky
439fb6fb0e
Fix the interpreter to not crash due to zeroext/signext
...
llvm-svn: 86428
2009-11-08 00:45:29 +00:00
Daniel Dunbar
3908a4047e
Prevent warning spew about -fPIC when using CMake generated Xcode project files.
...
llvm-svn: 86427
2009-11-08 00:34:22 +00:00
Jim Grosbach
a15c3b7124
Use aligned load/store instructions for spilling Q registers when we know the stack slot is 128 bit aligned
...
llvm-svn: 86425
2009-11-08 00:27:19 +00:00
Evan Cheng
fe864425cb
Refactor code.
...
llvm-svn: 86423
2009-11-08 00:15:23 +00:00
Daniel Dunbar
39a6c62b9d
Fix CMake reporting of target triple.
...
llvm-svn: 86419
2009-11-07 23:52:27 +00:00
Daniel Dunbar
c0fd8a4360
Stop running get_target_triple more than we need to.
...
llvm-svn: 86418
2009-11-07 23:52:20 +00:00
Daniel Dunbar
ec9491bda3
Fix MSVC warning ( | with bool and unsigned int).
...
llvm-svn: 86417
2009-11-07 23:51:55 +00:00
Daniel Dunbar
cdfb315f16
Fix class -> struct tag.
...
llvm-svn: 86416
2009-11-07 23:21:30 +00:00
Nate Begeman
3a313df69b
x86 vector shuffle cleanup/fixes:
...
1. rename the movhp patfrag to movlhps, since thats what it actually matches
2. eliminate the bogus movhps load and store patterns, they were incorrect. The load transforms are already handled (correctly) by shufps/unpack.
3. revert a recent test change to its correct form.
llvm-svn: 86415
2009-11-07 23:17:15 +00:00
Jim Grosbach
4e9f379554
80-column cleanup of file header comments
...
llvm-svn: 86408
2009-11-07 22:00:39 +00:00
Jim Grosbach
d1d002a6fe
Support alignment specifier for NEON vld/vst instructions
...
llvm-svn: 86404
2009-11-07 21:25:39 +00:00
Nick Lewycky
b9397262b7
Improve tail call elimination to handle the switch statement.
...
llvm-svn: 86403
2009-11-07 21:10:15 +00:00
Evan Cheng
8b5278a466
t2ldrpci_pic can be used for blockaddress as well.
...
llvm-svn: 86400
2009-11-07 19:40:04 +00:00
Chris Lattner
63ffdc748a
temporarily remove these tests, as they are breaking in the buildbot,
...
Eric, please investigate.
llvm-svn: 86399
2009-11-07 19:13:17 +00:00
Chris Lattner
c77d24b792
make instcombine only rewrite a chain of computation
...
(eliminating some extends) if the new type of the
computation is legal or if both the source and dest
are illegal. This prevents instcombine from changing big
chains of computation into i64 on 32-bit targets for
example.
llvm-svn: 86398
2009-11-07 19:11:46 +00:00
Chris Lattner
8714348afd
indicate what the native integer types for the target are.
...
Please verify.
llvm-svn: 86397
2009-11-07 19:07:32 +00:00
Chris Lattner
6fafd70c1e
all targets should be required to declare legal integer types. My plan to
...
make it optional doesn't work out. If you don't want to specify this, don't
specify a TD string at all.
llvm-svn: 86394
2009-11-07 18:53:00 +00:00
Chris Lattner
acc83d10bd
remove empty files.
...
llvm-svn: 86392
2009-11-07 18:03:32 +00:00
Chris Lattner
431000da21
Revert r86359, it is breaking the self host on the
...
llvm-gcc-i386-darwin9 build bot.
llvm-svn: 86391
2009-11-07 17:59:32 +00:00
Anton Korobeynikov
cf84ab5043
First try of the post-inc operands handling... Not fully worked, though :(
...
llvm-svn: 86386
2009-11-07 17:15:25 +00:00
Anton Korobeynikov
d3c8319f48
Add some dummy support for post-incremented loads
...
llvm-svn: 86385
2009-11-07 17:15:06 +00:00
Anton Korobeynikov
f93bb39b03
Add 8 bit libcalls and make use of them for msp430
...
llvm-svn: 86384
2009-11-07 17:14:39 +00:00
Anton Korobeynikov
e61e0b9a74
Add few pseudo-source-values
...
llvm-svn: 86383
2009-11-07 17:13:57 +00:00
Anton Korobeynikov
2a88785685
Initial support for addrmode handling. Tests by Brian Lucas!
...
llvm-svn: 86382
2009-11-07 17:13:35 +00:00
Anton Korobeynikov
1bbc8d2a86
Some preliminary variable asmprinting
...
llvm-svn: 86381
2009-11-07 17:12:58 +00:00
Anton Korobeynikov
3b7c712e9e
Use '.L' for global private prefix (as mspgcc)
...
llvm-svn: 86380
2009-11-07 17:12:38 +00:00
Anton Korobeynikov
e04fa15cb3
Drop old asmprinter stuff
...
llvm-svn: 86379
2009-11-07 17:12:21 +00:00
Anton Korobeynikov
226467d6a6
It turns out that the testcase in question uncovered subreg-handling bug.
...
Add assert in asmprinter to catch such cases and xfail the tests.
PR is to be filled.
llvm-svn: 86375
2009-11-07 15:20:32 +00:00
Chris Lattner
a381effe72
add the ability for TargetData to return information about legal integer
...
datatypes on a given CPU. This is intended to allow instcombine and other
transformations to avoid converting big sequences of operations to an
inconvenient width, and will help clean up after SRoA. See also "Adding
legal integer sizes to TargetData" on Feb 1, 2009 on llvmdev, and PR3451.
Comments welcome.
llvm-svn: 86370
2009-11-07 09:35:34 +00:00
Chris Lattner
91f9582fe1
more cleanup.
...
llvm-svn: 86369
2009-11-07 09:23:04 +00:00
Chris Lattner
d82510e109
add some missing #includes
...
llvm-svn: 86367
2009-11-07 09:20:54 +00:00
Chris Lattner
f819398067
rewrite TargetData to use StringRef/raw_ostream instead of thrashing std::strings.
...
llvm-svn: 86366
2009-11-07 09:13:23 +00:00
Chris Lattner
6b22952b03
prune #include / layering violation
...
llvm-svn: 86365
2009-11-07 09:07:01 +00:00
Jeffrey Yasskin
db5f24ce77
Make the need-stub variables accurate and consistent. In the case of
...
MachineRelocations, "stub" always refers to a far-call stub or a
load-a-faraway-global stub, so this patch adds "Far" to the term. (Other stubs
are used for lazy compilation and dlsym address replacement.) The variable was
also inconsistent between the positive and negative sense, and the positive
sense ("NeedStub") was more demanding than is accurate (since a nearby-enough
function can be called directly even if the platform often requires a stub).
Since the negative sense causes double-negatives, I switched to
"MayNeedFarStub" globally.
llvm-svn: 86363
2009-11-07 08:51:52 +00:00
Eric Christopher
bd05185ef1
Fix a couple of shuffle patterns to use movhlps instead
...
of movhps as the constraint. Changes optimizations so
update testcases as appropriate as well.
llvm-svn: 86360
2009-11-07 08:45:53 +00:00
Nick Lewycky
b6a3dd48f4
Teach dead store elimination that certain intrinsics write to memory just like
...
a store.
llvm-svn: 86359
2009-11-07 08:34:40 +00:00
Chris Lattner
c76ce9f208
remove the win32 tree, it's stale and confusing.
...
llvm-svn: 86358
2009-11-07 08:31:52 +00:00
Chris Lattner
5ff7f5672e
reapply 86289, 86278, 86270, 86267, 86266 & 86264 plus a fix
...
(making pred factoring only happen if threading is guaranteed
to be successful).
This now survives an X86-64 bootstrap of llvm-gcc.
llvm-svn: 86355
2009-11-07 08:05:03 +00:00
Chris Lattner
8e1d7222a7
Fix PR5421 by APInt'izing switch lowering.
...
llvm-svn: 86354
2009-11-07 07:50:34 +00:00
Nick Lewycky
9b669b3c4f
Oops, FunctionContainsEscapingAllocas is really used to mean two different
...
things. Back out part of r86349 for a moment.
llvm-svn: 86353
2009-11-07 07:42:38 +00:00
Nick Lewycky
5091272fdf
Dust off tail recursion elimination. Fix a fixme by applying CaptureTracking
...
and add a .ll to demo the new capability.
llvm-svn: 86349
2009-11-07 07:10:01 +00:00
Mikhail Glushenkov
0fa9474836
llvmc: Add a '-time' option.
...
llvm-svn: 86348
2009-11-07 06:33:58 +00:00
Mikhail Glushenkov
358607dfa3
Trailing whitespace.
...
llvm-svn: 86347
2009-11-07 06:33:12 +00:00
Mikhail Glushenkov
b53593d320
80-col violation.
...
llvm-svn: 86346
2009-11-07 06:33:01 +00:00
Chris Lattner
74ab6efbe8
merge cmp1 into cmp0 and filecheckize.
...
llvm-svn: 86345
2009-11-07 06:19:20 +00:00
Lang Hames
bc247dce4d
Update some globals to use ManagedStatic.
...
llvm-svn: 86342
2009-11-07 05:50:28 +00:00
Mon P Wang
fc032ced22
Fix memoizing of CvtRndSatSDNode
...
llvm-svn: 86340
2009-11-07 04:46:25 +00:00
Mon P Wang
5321dd8823
Fixed Overload table bug noticed by Jakob
...
llvm-svn: 86332
2009-11-07 04:07:33 +00:00
Evan Cheng
16e1c31da2
Missed this.
...
llvm-svn: 86331
2009-11-07 04:07:30 +00:00
Evan Cheng
a8e8a7c976
Refactor code. Fix a potential missing check. Teach isIdentical() about tLDRpci_pic.
...
llvm-svn: 86330
2009-11-07 04:04:34 +00:00
Evan Cheng
7ff831962a
- Add TargetInstrInfo::isIdentical(). It's similar to MachineInstr::isIdentical
...
except it doesn't care if the definitions' virtual registers differ. This is
used by machine LICM and other MI passes to perform CSE.
- Teach Thumb2InstrInfo::isIdentical() to check two t2LDRpci_pic are identical.
Since pc relative constantpool entries are always different, this requires it
it check if the values can actually the same.
llvm-svn: 86328
2009-11-07 03:52:02 +00:00
Ted Kremenek
50dddc8b07
Update CMake file.
...
llvm-svn: 86325
2009-11-07 03:26:59 +00:00
Kenneth Uildriks
07119737aa
Add code to check at SelectionDAGISel::LowerArguments time to see if return values can be lowered to registers. Coming soon, code to perform sret-demotion if return values cannot be lowered to registers
...
llvm-svn: 86324
2009-11-07 02:11:54 +00:00
Jakob Stoklund Olesen
4141d8ee92
Fix inverted conflict test in -early-coalesce.
...
A non-identity copy cannot be coalesced when the phi join destination register
is live at the copy site.
Also verify the condition that the PHI join source register is only used in
the PHI join. Otherwise the coalescing is invalid.
llvm-svn: 86322
2009-11-07 01:58:40 +00:00
Devang Patel
3a42e7ac65
Revert following patches to fix llvmgcc bootstrap.
...
86289, 86278, 86270, 86267, 86266 & 86264
Chris, please take a look.
llvm-svn: 86321
2009-11-07 01:32:59 +00:00
Johnny Chen
3467dcb12d
My previous patch (r84124) for setting the encoding bits 4 and 7 of DPSoRegFrm
...
was wrong and too aggressive in the sense that DPSoRegFrm includes both constant
shifts (with Inst{4} = 0) and register controlled shifts (with Inst{4} = 1 and
Inst{7} = 0). The 'rr' fragment of the multiclass definitions actually means
register/register with no shift, see A8-11.
llvm-svn: 86319
2009-11-07 00:54:36 +00:00
Victor Hernandez
bde558c536
- new SROA mallocs should have the mallocs running-or'ed, not the malloc's bitcast
...
- fix ProcessInternalGlobal() debug output
llvm-svn: 86317
2009-11-07 00:41:19 +00:00
Victor Hernandez
e04ed0c68f
Fit in 80 columns
...
llvm-svn: 86316
2009-11-07 00:36:50 +00:00
Jeffrey Yasskin
8f77e948e5
Avoid "ambiguous 'else'" warning from gcc.
...
llvm-svn: 86314
2009-11-07 00:26:47 +00:00
Victor Hernandez
f3db915294
Re-commit r86077 now that r86290 fixes the 179.art and 175.vpr ARM regressions.
...
Here is the original commit message:
This commit updates malloc optimizations to operate on malloc calls that have constant int size arguments.
Update CreateMalloc so that its callers specify the size to allocate:
MallocInst-autoupgrade users use non-TargetData-computed allocation sizes.
Optimization uses use TargetData to compute the allocation size.
Now that malloc calls can have constant sizes, update isArrayMallocHelper() to use TargetData to determine the size of the malloced type and the size of malloced arrays.
Extend getMallocType() to support malloc calls that have non-bitcast uses.
Update OptimizeGlobalAddressOfMalloc() to optimize malloc calls that have non-bitcast uses. The bitcast use of a malloc call has to be treated specially here because the uses of the bitcast need to be replaced and the bitcast needs to be erased (just like the malloc call) for OptimizeGlobalAddressOfMalloc() to work correctly.
Update PerformHeapAllocSRoA() to optimize malloc calls that have non-bitcast uses. The bitcast use of the malloc is not handled specially here because ReplaceUsesOfMallocWithGlobal replaces through the bitcast use.
Update OptimizeOnceStoredGlobal() to not care about the malloc calls' bitcast use.
Update all globalopt malloc tests to not rely on autoupgraded-MallocInsts, but instead use explicit malloc calls with correct allocation sizes.
llvm-svn: 86311
2009-11-07 00:16:28 +00:00
Jim Grosbach
79d70e3e65
80-columns
...
llvm-svn: 86310
2009-11-07 00:13:30 +00:00
Jeffrey Yasskin
ba78dcd90d
Give the JITResolver a direct pointer to its JITEmitter, and use that instead
...
of going through the global TheJIT variable. This makes it easier to use
features of JITEmitter that aren't in JITCodeEmitter for fixing PR5201.
llvm-svn: 86305
2009-11-07 00:00:10 +00:00
Evan Cheng
207b246650
- Add pseudo instructions tLDRpci_pic and t2LDRpci_pic which does a pc-relative
...
load of a GV from constantpool and then add pc. It allows the code sequence to
be rematerializable so it would be hoisted by machine licm.
- Add a late pass to break these pseudo instructions into a number of real
instructions. Also move the code in Thumb2 IT pass that breaks up t2MOVi32imm
to this pass. This is done before post regalloc scheduling to allow the
scheduler to proper schedule these instructions. It also allow them to be
if-converted and shrunk by later passes.
llvm-svn: 86304
2009-11-06 23:52:48 +00:00
Anton Korobeynikov
9df3acf486
Honour subreg machine operands during asmprinting
...
llvm-svn: 86303
2009-11-06 23:45:15 +00:00
Bob Wilson
d95ccd6c4d
Print VMOV (immediate) operands as hexadecimal values. Apple's assembler
...
will not accept negative values for these. LLVM's default operand printing
sign extends values, so that valid unsigned values appear as negative
immediates. Print all VMOV immediate operands as hex values to resolve this.
Radar 7372576.
llvm-svn: 86301
2009-11-06 23:33:28 +00:00
Chris Lattner
eb690feaef
Fix a bug where we'd call SplitBlockPredecessors with a pred in the
...
set only once even if it has multiple edges to BB.
llvm-svn: 86299
2009-11-06 23:19:58 +00:00
Bob Wilson
db42ca663b
Fix a broken test.
...
llvm-svn: 86298
2009-11-06 23:06:42 +00:00
Bob Wilson
b29e155c53
Fix comment typos.
...
llvm-svn: 86295
2009-11-06 22:38:38 +00:00
Evan Cheng
408aa56fb5
Remove ARMPCLabelIndex from ARMISelLowering. Use ARMFunctionInfo::createConstPoolEntryUId() instead.
...
llvm-svn: 86294
2009-11-06 22:24:13 +00:00
Victor Hernandez
ce99780980
CallInst::CreateMalloc() and CallInst::CreateFree() need to create calls with correct calling convention
...
llvm-svn: 86290
2009-11-06 21:43:21 +00:00
Eli Friedman
a70917b2f4
Remove function left over from other jump threading cleanup.
...
llvm-svn: 86289
2009-11-06 21:24:57 +00:00
Gabor Greif
445737df6a
fix typo
...
llvm-svn: 86281
2009-11-06 20:10:46 +00:00
Chris Lattner
a8b9ce3f07
Fix a problem discovered on self host.
...
llvm-svn: 86278
2009-11-06 19:21:48 +00:00
Chris Lattner
d91a7960bf
remove more code subsumed by r86264
...
llvm-svn: 86270
2009-11-06 18:24:32 +00:00
Devang Patel
33e0c99d67
Tolerate invalid derived type.
...
llvm-svn: 86269
2009-11-06 18:24:05 +00:00
Chris Lattner
899ef22acb
eliminate some more code subsumed by r86264
...
llvm-svn: 86267
2009-11-06 18:22:54 +00:00
Chris Lattner
2f6184f6aa
remove now redundant code, r86264 handles this case.
...
llvm-svn: 86266
2009-11-06 18:20:58 +00:00
Chris Lattner
68d2417e05
Extend jump threading to support much more general threading
...
predicates. This allows us to jump thread things like:
_ZN12StringSwitchI5ColorE4CaseILj7EEERS1_RAT__KcRKS0_.exit119:
%tmp1.i24166 = phi i8 [ 1, %bb5.i117 ], [ %tmp1.i24165, %_Z....exit ], [ %tmp1.i24165, %bb4.i114 ]
%toBoolnot.i87 = icmp eq i8 %tmp1.i24166, 0 ; <i1> [#uses=1]
%tmp4.i90 = icmp eq i32 %tmp2.i, 6 ; <i1> [#uses=1]
%or.cond173 = and i1 %toBoolnot.i87, %tmp4.i90 ; <i1> [#uses=1]
br i1 %or.cond173, label %bb4.i96, label %_ZN12...
Where it is "obvious" that when coming from %bb5.i117 that the 'and' is always
false. This triggers a surprisingly high number of times in the testsuite,
and gets us closer to generating good code for doug's strswitch testcase.
This also make a bunch of other code in jump threading redundant, I'll rip
out in the next patch. This survived an enable-checking llvm-gcc bootstrap.
llvm-svn: 86264
2009-11-06 18:15:14 +00:00
Dan Gohman
0080ee2d91
Use WriteAsOperand to print GlobalAddress MachineOperands. This
...
prints them with the leading '@'.
llvm-svn: 86261
2009-11-06 18:03:10 +00:00
Devang Patel
cc11371b77
Do not bother to emit debug info for nameless global variable.
...
llvm-svn: 86259
2009-11-06 17:58:12 +00:00
Daniel Dunbar
ad36e8aceb
Pass StringRef by value.
...
llvm-svn: 86251
2009-11-06 10:58:06 +00:00
Chris Lattner
81f1b31c96
clang++ points out that this is pointless.
...
llvm-svn: 86239
2009-11-06 06:33:01 +00:00
Chris Lattner
8c12bb8cd7
remove some more Context arguments.
...
llvm-svn: 86235
2009-11-06 05:59:53 +00:00
Chris Lattner
46b5c642b9
remove a bunch of extraneous LLVMContext arguments
...
from various APIs, addressing PR5325.
llvm-svn: 86231
2009-11-06 04:27:31 +00:00
Daniel Dunbar
529f913f55
NewNighlytTest: Fix timestamp format to actually make sense (it was missing the hour).
...
llvm-svn: 86229
2009-11-06 04:12:13 +00:00
Daniel Dunbar
04b3960bfe
NewNightlyTest: Add -noclean option, which doesn't run 'make clean' before building LLVM (for testing).
...
Also, switch to always running 'make clean' in the test-suite directories.
llvm-svn: 86228
2009-11-06 04:12:07 +00:00
Daniel Dunbar
9e0febb2c7
NewNightlyTest: Unbreak passing the build directory via a positional argument.
...
llvm-svn: 86227
2009-11-06 04:12:02 +00:00
Daniel Dunbar
545ffe6fc1
NewNightlyTest: Add -llvmgccdir as alternative to environment variable.
...
llvm-svn: 86226
2009-11-06 04:11:29 +00:00
Victor Hernandez
b9f5899779
Revert r86077 because it caused crashes in 179.art and 175.vpr on ARM
...
llvm-svn: 86213
2009-11-06 01:33:24 +00:00
Devang Patel
06ce6506d2
Do not try to emit debug info entry for dead global variable.
...
llvm-svn: 86212
2009-11-06 01:30:04 +00:00
Dan Gohman
701e4e9b2b
Don't print a redundant tab for inline asm, and do use the new printKill.
...
llvm-svn: 86206
2009-11-06 00:19:43 +00:00
Douglas Gregor
140db51755
Add a bunch of missing "template" keywords to disambiguate dependent template names. GCC eats this ill-formed code, Clang does not. I already filed PR5404 to improve recovery in this case
...
llvm-svn: 86204
2009-11-06 00:12:53 +00:00
Eric Christopher
80f04dc67d
Fix PR5315, original patch by Nicolas Capens!
...
llvm-svn: 86203
2009-11-06 00:11:57 +00:00
Dan Gohman
ee8afcc59d
Factor out the printing of the leading tab into printInlineAsm.
...
llvm-svn: 86199
2009-11-06 00:04:54 +00:00
Dan Gohman
6791639910
Make printImplicitDef and printKill non-virtual, since they don't
...
need to be overridden.
llvm-svn: 86198
2009-11-06 00:04:05 +00:00
Dan Gohman
006f9353e1
Use SUBREG_TO_REG instead of INSERT_SUBREG to model x86-64's
...
implicit zero-extend.
llvm-svn: 86196
2009-11-05 23:53:08 +00:00
Dan Gohman
a1bf0c0acc
Teach LSR to avoid calling SplitCriticalEdge on edges with indirectbr.
...
llvm-svn: 86193
2009-11-05 23:34:59 +00:00
Dan Gohman
98693a3ac2
Update these tests for the new label names.
...
llvm-svn: 86192
2009-11-05 23:31:40 +00:00
Dan Gohman
d53b5cfe3f
Fix the label name generation for address-taken labels to avoid potential
...
problems with name collisions.
llvm-svn: 86189
2009-11-05 23:14:35 +00:00
Douglas Gregor
5632657208
Make a few more LLVM headers parsable as standalone headers.
...
Fix some problems with the hidden copy constructors for
ImmutableMap/ImmutableSet found by Clang++.
llvm-svn: 86186
2009-11-05 23:01:30 +00:00
Douglas Gregor
86a947dde9
Teach lit's SyntaxCheckTest two new tricks:
...
- skip .svn directories
- add a set of excluded filenames so we can easily skip tests
llvm-svn: 86185
2009-11-05 22:58:04 +00:00
Lang Hames
933c541270
Added support for renumbering existing index list elements. Removed some junk from the initial numbering code in runOnMachineFunction.
...
llvm-svn: 86184
2009-11-05 22:20:57 +00:00
Dan Gohman
928068a886
Avoid calling getUniqueExitBlocks from within LoopSimplify, as it depends
...
on loops having dedicated exits, which LoopSimplify can no longer always
guarantee.
llvm-svn: 86181
2009-11-05 21:48:32 +00:00
Dan Gohman
dca7ac335b
LoopDeletion depends on loops having dedicated exits.
...
llvm-svn: 86180
2009-11-05 21:47:04 +00:00
Dan Gohman
1ef784db67
The introduction of indirectbr meant the introduction of
...
unsplittable critical edges, which means the introduction of
loops which cannot be transformed to LoopSimplify form. Fix
LoopSimplify to avoid transforming such loops into invalid
code.
llvm-svn: 86176
2009-11-05 21:14:46 +00:00
Dan Gohman
a83ac2d9e7
Update various Loop optimization passes to cope with the possibility that
...
LoopSimplify form may not be available.
llvm-svn: 86175
2009-11-05 21:11:53 +00:00
David Goodwin
bed7cb6c1d
Fix bug in aggressive antidep breaking; liveness was not updated correctly for regions that do not have antidep candidates.
...
llvm-svn: 86172
2009-11-05 21:06:09 +00:00
Dan Gohman
415c64ea3f
Teach LoopUnroll how to bail if LoopSimplify can't give it what it needs.
...
llvm-svn: 86164
2009-11-05 19:44:06 +00:00
Dan Gohman
d9fa1c9c1e
Call getAnalysis<LoopInfo> the normal way, instead of asking passed-in
...
LoopPassManager for it.
llvm-svn: 86163
2009-11-05 19:43:25 +00:00
Dan Gohman
b632705017
InstrTypes.h includes Instruction.h, so it's not necessary to include both.
...
llvm-svn: 86162
2009-11-05 19:42:20 +00:00
Dan Gohman
2267f8aa72
Fix IVUsers to avoid assuming that the loop has a unique backedge.
...
llvm-svn: 86161
2009-11-05 19:41:37 +00:00
Dan Gohman
885c46e387
Delete an unused member variable.
...
llvm-svn: 86160
2009-11-05 19:33:15 +00:00
Dan Gohman
e3a1706e33
Factor out the predicate code for loopsimplify form exit blocks into
...
a separate helper function.
llvm-svn: 86159
2009-11-05 19:21:41 +00:00
Oscar Fuentes
17feb2a9ee
CMake: Detect dotty.
...
Patch by Arnaud Allard de Grandmaison!
llvm-svn: 86153
2009-11-05 19:03:26 +00:00
Oscar Fuentes
1a0bfb6290
CMake: do not test for pthread and dl libraries on Windows (except
...
Cygwin). Fixes PR 5368.
llvm-svn: 86152
2009-11-05 18:57:56 +00:00
Dan Gohman
43bdc260d6
Avoid printing a redundant space in SDNode->dump().
...
llvm-svn: 86151
2009-11-05 18:49:11 +00:00
Dan Gohman
b15f4a1cbd
Remove uninteresting and confusing debug output.
...
llvm-svn: 86149
2009-11-05 18:47:09 +00:00
Douglas Gregor
e076030f0c
Move llvm: 🆑 :opt's conversion function into the base classes that
...
actually need that conversion function. Silences a Clang++ warning.
llvm-svn: 86148
2009-11-05 18:30:50 +00:00
Dan Gohman
00c793822e
Add an assertion to catch indirectbr in SplitBlockPredecessors. This
...
makes several optimization passes abort in cases where they're currently
silently miscompiling code.
Remove the indirectbr assertion from SplitEdge. Indirectbr is only
a problem for critical edges, and SplitEdge defers to SplitCriticalEdge
to handle those, and SplitCriticalEdge has its own assertion for
indirectbr.
llvm-svn: 86147
2009-11-05 18:25:44 +00:00
Chris Lattner
06c26d982e
add a note from PR5313
...
llvm-svn: 86146
2009-11-05 18:19:19 +00:00
Chris Lattner
a117dd23e9
Declare classes with matched tags, pointed out by a clang++ warning.
...
llvm-svn: 86144
2009-11-05 17:51:44 +00:00
Benjamin Kramer
b971445ab7
Teach SimplifyLibCalls to fold memcmp calls with constant arguments.
...
llvm-svn: 86141
2009-11-05 17:44:22 +00:00
Daniel Dunbar
1891a167a1
lit: Add --param NAME=VALUE option, for test suite specific use (to communicate
...
arbitrary command line arguments to the test suite).
llvm-svn: 86137
2009-11-05 16:27:33 +00:00
Benjamin Kramer
3fcbb82151
Do map insert+find in one step. TODO -= 2.
...
llvm-svn: 86133
2009-11-05 14:33:27 +00:00
Benjamin Kramer
9470ecdb2c
Path::createDirectoryOnDisk should ignore existing directories on win32 too.
...
llvm-svn: 86132
2009-11-05 14:32:40 +00:00
Douglas Gregor
73818d685e
Make two more LLVM headers standalone
...
llvm-svn: 86131
2009-11-05 13:39:23 +00:00
Douglas Gregor
9ad44629c3
Make a few headers standalone. Plus, add a missing "template" keyword
...
that Clang diagnoses but GCC does not.
llvm-svn: 86130
2009-11-05 13:30:28 +00:00
Chris Lattner
046dff7acf
merge a few crash tests into crash.ll
...
llvm-svn: 86119
2009-11-05 05:57:34 +00:00
Mon P Wang
1a58236c2b
Reintroduce support for overloading target intrinsics
...
llvm-svn: 86114
2009-11-05 03:19:08 +00:00
David Goodwin
542649463b
Replace std::map.at() with std::map[].
...
llvm-svn: 86102
2009-11-05 01:45:50 +00:00
David Goodwin
7d8878add2
Break anti-dependencies using free registers in a round-robin manner to avoid introducing new anti-dependencies.
...
llvm-svn: 86098
2009-11-05 01:19:35 +00:00
Lang Hames
274be49480
Tidied some ugliness in the SlotIndex default constructor.
...
llvm-svn: 86097
2009-11-05 01:18:31 +00:00
Evan Cheng
66549b2818
Now that code placement optimization pass is run for JIT, make sure it's before pre-emit passes.
...
llvm-svn: 86092
2009-11-05 01:16:59 +00:00
Devang Patel
ba52f03052
Use WeakVH while storing metadata in containers.
...
This fixes PR5393.
llvm-svn: 86091
2009-11-05 01:13:02 +00:00
Lang Hames
a31fd78ff8
Removed an assert which was causing significant slowdowns in debug builds.
...
This assert was very conservative to begin with (the error condition is well
covered by tests elsewhere in the code) so we won't miss much by removing it.
llvm-svn: 86088
2009-11-05 00:52:28 +00:00
Bob Wilson
45119d8850
Add -mtriple to llc commands, attempting to fix buildbot failures.
...
llvm-svn: 86086
2009-11-05 00:51:31 +00:00
Evan Cheng
921152fe9d
Code refactoring.
...
llvm-svn: 86085
2009-11-05 00:51:13 +00:00
Bob Wilson
90d0b82e12
Attempt again to fix buildbot failures: make expected output less specific
...
and compile with -mtriple to specify *-apple-darwin targets.
llvm-svn: 86081
2009-11-05 00:30:35 +00:00
David Goodwin
28ba4f27d1
Correctly add chain dependencies around calls and unknown-side-effect instructions.
...
llvm-svn: 86080
2009-11-05 00:16:44 +00:00