1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

64193 Commits

Author SHA1 Message Date
Chris Lattner
e667efb462 nuke dead ivar which was supposed to be committed with r112496
llvm-svn: 112497
2010-08-30 18:16:27 +00:00
Chris Lattner
765e59210c two changes:
1) nuke ConstDataCoalSection, which is dead.
2) revise my previous patch for rdar://8018335,
  which was completely wrong.  Specifically, it doesn't 
  make sense to mark __TEXT,__const_coal as PURE_INSTRUCTIONS,
  because it is for readonly data.  templates (it turns out)
  go to const_coal_nt.  The real fix for rdar://8018335 was
  to give ConstTextCoalSection a section kind of ReadOnly 
  instead of Text.

llvm-svn: 112496
2010-08-30 18:12:35 +00:00
Bob Wilson
2b83684be8 When expanding NEON VST pseudo instructions, if the original super-register
operand is killed, add it to the expanded instruction as an implicit kill
operand instead of marking the individual subregs with kill flags.  This
should work better in general and also handles the case for VST3 where one
of the subregs was not referenced in the expanded instruction and so was
not marked killed.

llvm-svn: 112494
2010-08-30 18:10:48 +00:00
Benjamin Kramer
6c5076f317 MCELF: The value of all common symbols is the offset from the start of the section. Patch by Roman Divacky.
llvm-svn: 112492
2010-08-30 17:20:17 +00:00
Owen Anderson
d29fb4b991 It is possible to try to merge a not-constant with a constantrage, when dealing with ptrtoint ConstantExpr's.
Unfortunately, the only testcase I have for this is huge and doesn't reduce well because the error is
sensitive to iteration-order issues, since the problem only occurs when merging values in a particular order.

llvm-svn: 112489
2010-08-30 17:03:45 +00:00
Michael J. Spencer
51a65365f3 Partially revert r112480. Caused test failures.
llvm-svn: 112486
2010-08-30 15:34:08 +00:00
NAKAMURA Takumi
89dab50acd coff-dump.py: Fix PR7996. Now it is compatible to Python-2.4.
llvm-svn: 112485
2010-08-30 15:19:56 +00:00
Michael J. Spencer
2f463fc492 Fix constant-over-index.ll test on windows.
llvm-svn: 112483
2010-08-30 15:08:02 +00:00
Michael J. Spencer
cd662e3540 Test: Fix LLVMC tests on CMake.
The CMake build didn't define TEST_COMPILE_CXX_CMD. The tests assumed gcc.

llvm-svn: 112480
2010-08-30 14:49:00 +00:00
Benjamin Kramer
b63bf8cf9b Don't print two "0x" prefixes. Use a raw_ostream overload instead of llvm::format.
llvm-svn: 112479
2010-08-30 14:46:53 +00:00
NAKAMURA Takumi
b5613b9f12 EE/JIT: Do not invoke parent's ctors/dtors from main()! (PR3897)
On Mingw and Cygwin, the symbol __main is resolved to
callee's(eg. tools/lli) one, to invoke wrong duplicated ctors
(and register wrong callee's dtors with atexit(3)).
We expect, by callee, ExecutionEngine::runStaticConstructorsDestructors()
is called before ExecutionEngine::runFunctionAsMain() is called.

llvm-svn: 112474
2010-08-30 14:00:29 +00:00
Benjamin Kramer
b540b09a7c The value is offset from the start of the section for non-common symbols, submitted by Jordan Gordeev.
llvm-svn: 112473
2010-08-30 12:00:16 +00:00
Benjamin Kramer
ca65cc9222 Index external symbols by symbol table instead of parent section, by Roman Divacky.
llvm-svn: 112472
2010-08-30 11:59:29 +00:00
Benjamin Kramer
3aabb3eb53 Mark all common symbols external. This is not exactly correct but it lets apps
link for now and can be adjusted later. Patch by Roman Divacky.

llvm-svn: 112471
2010-08-30 11:56:55 +00:00
Duncan Sands
3e49fe09db Remove a hack that tries to understand incorrect triples from the
Triple class constructor.  Only valid triples should now be used
inside LLVM - front-ends are now responsable for rejecting or
correcting invalid target triples.  The Triple::normalize method
can be used to straighten out funky triples provided by users.
Give this a whirl through the buildbots to see if I caught all
places where triples enter LLVM.

llvm-svn: 112470
2010-08-30 10:57:54 +00:00
Duncan Sands
254f8ff0a6 Correct bogus module triple specifications.
llvm-svn: 112469
2010-08-30 10:48:29 +00:00
Owen Anderson
fd4ce93e17 Add a new example to the LLVM distribution: a trace-based Brainfuck compiler that uses LLVM as its code generator.
llvm-svn: 112465
2010-08-30 07:33:39 +00:00
Chandler Carruth
eddd738031 Attempt to remove the MSIL backend from CMake as well based on Chris's r112375.
llvm-svn: 112464
2010-08-30 07:25:54 +00:00
Bill Wendling
999c8b219d Revert r112461. It was failing on PPC...
llvm-svn: 112463
2010-08-30 04:36:50 +00:00
Bill Wendling
c325a15569 Create Thumb2sI_cpsr and T2sI_cpsr. These new classes indicate that CPSR is the
optional modified register (instead of reg0). Along with r112461 it will make
sure that the optional define of CPSR is marked as "def" and will thus mark the
instructions using these classes (t2ANDS*) as setting the 's' flag.

llvm-svn: 112462
2010-08-30 01:47:35 +00:00
Bill Wendling
450e009b5e When adding a register, we should mark it as "def" if it can optionally define
said (physical) register.

llvm-svn: 112461
2010-08-30 01:36:05 +00:00
Chris Lattner
8331070df0 revert 112457, it looks like it broke selfhost.
llvm-svn: 112459
2010-08-29 22:28:18 +00:00
Chris Lattner
92879a5ba1 rewrite DwarfEHPrepare to use SSAUpdater to promote its allocas
instead of PromoteMemToReg.  This allows it to stop using DF and DT,
eliminating a computation of DT and DF from clang -O3.  Clang is now
down to 2 runs of DomFrontier.

llvm-svn: 112457
2010-08-29 19:54:28 +00:00
Chris Lattner
a38548a56d inline function into its only caller.
llvm-svn: 112455
2010-08-29 19:28:28 +00:00
Chris Lattner
9e35d96cea two changes: 1) make AliasSet hold the list of call sites with an
assertingvh so we get a violent explosion if the pointer dangles.

2) Fix AliasSetTracker::deleteValue to remove call sites with
   by-pointer comparisons instead of by-alias queries.  Using
   findAliasSetForCallSite can cause alias sets to get merged
   when they shouldn't, and can also miss alias sets when the
   call is readonly.

#2 fixes PR6889, which only repros with a .c file :(

llvm-svn: 112452
2010-08-29 18:42:23 +00:00
Chris Lattner
51639dea34 LICM does get dead instructions input to it. Instead of sinking them
out of loops, just delete them.

llvm-svn: 112451
2010-08-29 18:22:25 +00:00
Chris Lattner
aac9263929 use moveBefore instead of remove+insert, it avoids some
symtab manipulation, so its faster (in addition to being
more elegant)

llvm-svn: 112450
2010-08-29 18:18:40 +00:00
Chris Lattner
5c31ee4663 revert 112448 for now.
llvm-svn: 112449
2010-08-29 18:11:16 +00:00
Chris Lattner
8e922b170c optimize LICM::hoist to use moveBefore. Correct its updating
of AST to remove the hoisted instruction from the AST, since it
is no longer in the loop.

llvm-svn: 112448
2010-08-29 18:03:33 +00:00
Chris Lattner
150bdce5c1 fix some bugs (found by inspection) where LICM would not update
LICM correctly.  When sinking an instruction, it should not add
entries for the sunk instruction to the AST, it should remove
the entry for the sunk instruction.  The blocks being sunk to
are not in the loop, so their instructions shouldn't be in the
AST (yet)!

llvm-svn: 112447
2010-08-29 18:00:00 +00:00
Chris Lattner
a3b10c0752 rework the ownership of subloop alias information: instead of
keeping them around until the pass is destroyed, keep them
around a) just when useful (not for outer loops) and b) destroy
them right after we use them.  This should reduce memory use
and fixes potential bugs where a loop is deleted and another
loop gets allocated to the same address.

llvm-svn: 112446
2010-08-29 17:46:00 +00:00
Chris Lattner
4cdad46980 apparently unswitch had the same "Feature". Stop its
claims that it preserves domfrontier if it doesn't really.

llvm-svn: 112445
2010-08-29 17:23:19 +00:00
Chris Lattner
7181337888 now that loop passes don't use DomFrontier, there is no reason
for the unroller to pretend it supports updating it.  It still
has a horrible hack for DomTree.

llvm-svn: 112444
2010-08-29 17:21:35 +00:00
Dan Gohman
9ea315c5ca Make IVUsers iterative instead of recursive.
This has the side effect of reversing the order of most of
IVUser's results.

llvm-svn: 112442
2010-08-29 16:40:03 +00:00
Dan Gohman
d7ad97b6f5 Optionally rerun dedicated-register filtering after applying
other filtering techniques, as those may allow it to filter
out more obviously unprofitable candidates.

llvm-svn: 112441
2010-08-29 16:39:22 +00:00
Dan Gohman
d5e0d45b20 Fix several areas in LSR to do a better job keeping the main
LSRInstance data structures up to date. This fixes some
pessimizations caused by stale data which will be exposed
in an upcoming change.

llvm-svn: 112440
2010-08-29 16:32:54 +00:00
Dan Gohman
b62347f067 Refactor the three main groups of code out of
NarrowSearchSpaceUsingHeuristics into separate functions.

llvm-svn: 112439
2010-08-29 16:09:42 +00:00
Dan Gohman
7b45482eab Delete a bogus check.
llvm-svn: 112438
2010-08-29 15:30:29 +00:00
Dan Gohman
bde89495fa Add some comments.
llvm-svn: 112437
2010-08-29 15:27:08 +00:00
Dan Gohman
185c024c53 Move this debug output into GenerateAllReuseFormula, to declutter
the high-level logic.

llvm-svn: 112436
2010-08-29 15:21:38 +00:00
Dan Gohman
5023e9f408 Delete an unused declaration.
llvm-svn: 112435
2010-08-29 15:19:11 +00:00
Dan Gohman
defdc9d59c Do one lookup instead of two.
llvm-svn: 112434
2010-08-29 15:18:49 +00:00
Dan Gohman
4e9013673c Restructure the {A,+,B}<L> * {C,+,D}<L> folding so that it folds
all applicable addrecs before recursing on getMulExpr, instead of
recursing on getMulExpr for each one.

llvm-svn: 112433
2010-08-29 15:16:58 +00:00
Dan Gohman
88b40ae04a Batch up subtracts along with adds, when analyzing long chains of
operations.

llvm-svn: 112432
2010-08-29 15:10:06 +00:00
Dan Gohman
988c90a5e1 Micro-optimize GroupByComplexity.
llvm-svn: 112431
2010-08-29 15:07:13 +00:00
Dan Gohman
690916c085 Hold AddRec->getLoop() in a variable, to make the Mul code more consistent
with the Add code.

llvm-svn: 112430
2010-08-29 14:55:19 +00:00
Dan Gohman
5a3ad9c218 Rename a variable, for consistency.
llvm-svn: 112429
2010-08-29 14:53:34 +00:00
Dan Gohman
d581ece72a Use iterators instead of indices.
llvm-svn: 112428
2010-08-29 14:52:02 +00:00
Dan Gohman
8507175536 Don't worry about union types.
llvm-svn: 112427
2010-08-29 14:50:21 +00:00
Dan Gohman
0fdab32e0f Make this test less dependent on register allocation choices.
llvm-svn: 112426
2010-08-29 14:49:42 +00:00