Owen Anderson
9b89e4b561
Fix a small bug, some 80 cols violations, and add some more debugging output.
...
llvm-svn: 37436
2007-06-05 17:31:23 +00:00
Dan Gohman
151169df1e
Allow insertelement, extractelement, and shufflevector to be hoisted/sunk
...
by LICM.
llvm-svn: 37435
2007-06-05 16:05:55 +00:00
Evan Cheng
252695f0f6
PIC label asm printing cosmetic changes.
...
llvm-svn: 37434
2007-06-05 07:36:38 +00:00
Evan Cheng
2c1acd6d9e
I had a senior moment.
...
llvm-svn: 37433
2007-06-05 07:05:25 +00:00
Zhou Sheng
2444a9adeb
Commit first round work of PR1373. "noalias" is now fully supported in
...
VMCore, BitCode, and Assembly. Documentation and test case paramattrs.ll
updated also.
llvm-svn: 37432
2007-06-05 05:28:26 +00:00
Evan Cheng
6e4babe8cc
If the predicated block requires an early exit, end the block there and add a unconditional branch to false block. AnalyzeBranch() does not understand early exits.
...
llvm-svn: 37430
2007-06-05 01:31:40 +00:00
Evan Cheng
17aad8164e
Fix some subtle bugs: bug during succeessor copying; incorrectly updating states of ifcvted blocks.
...
llvm-svn: 37429
2007-06-05 00:07:37 +00:00
Bill Wendling
6357bf20fa
Patches by Chuck Rose to unbreak V Studio builds.
...
Thanks Chuck!
llvm-svn: 37428
2007-06-04 23:52:59 +00:00
Dale Johannesen
0558dda319
Tail merging wasn't working for predecessors of landing pads. PR 1496.
...
llvm-svn: 37427
2007-06-04 23:52:54 +00:00
Devang Patel
b3adb9876a
s/ETNode::getChildren/ETNode::getETNodeChildren/g
...
llvm-svn: 37426
2007-06-04 23:45:02 +00:00
Owen Anderson
3c9d8eef21
Don't use std::set_difference when the two sets are sorted differently. Compute
...
the difference manually instead.
This allows GVNPRE to produce correct analysis for the example in the GVNPRE
paper.
llvm-svn: 37425
2007-06-04 23:34:56 +00:00
Owen Anderson
3df5299f94
Fix a bunch of small bugs, and improve the debugging output significantly.
...
llvm-svn: 37424
2007-06-04 23:28:33 +00:00
Chris Lattner
d7897d40b6
When rebuilding constant structs, make sure to honor the isPacked bit.
...
This fixes PR1491 and GlobalOpt/2007-06-04-PackedStruct.ll
llvm-svn: 37423
2007-06-04 22:23:42 +00:00
Evan Cheng
53ce7de03b
Global ctors / dtors alignment shouldn't be hard-coded at 4. e.g. It could be 8 for 64-bit targets.
...
llvm-svn: 37421
2007-06-04 20:39:18 +00:00
Evan Cheng
91233153bf
Forgot to check for if iterator reached the end.
...
llvm-svn: 37420
2007-06-04 20:33:36 +00:00
Evan Cheng
59ca6a846f
Misuse of hasExternalLinkage(), should be checking isDeclaration().
...
llvm-svn: 37419
2007-06-04 18:54:57 +00:00
Owen Anderson
38b6b22a41
Make phi_translate correct.
...
llvm-svn: 37418
2007-06-04 18:05:26 +00:00
Devang Patel
4a7c2830d4
Add FIXMEs.
...
llvm-svn: 37417
2007-06-04 17:38:00 +00:00
Devang Patel
ebc5b96735
s/DominatorTree::createNewNode/DominatorTree::addNewBlock/g
...
llvm-svn: 37415
2007-06-04 16:43:25 +00:00
Devang Patel
a89566aefd
Add basic block level interface to change immediate dominator
...
and create new node.
llvm-svn: 37414
2007-06-04 16:22:33 +00:00
Dan Gohman
b4c2690446
Pass the DAG to SDNode::dump to let it do more detailed dumps in some cases.
...
llvm-svn: 37413
2007-06-04 16:17:33 +00:00
Dan Gohman
92a7f3a65e
Resolve implicit alignment before computing the FoldingSet information so
...
that the CSE map always contains explicit alignment information. This allows
more loads to be CSE'd when there is a mix of explicit-alignment loads and
implicit-alignment loads.
Also, in SelectionDAG::FindModifiedNodeSlot, add the operands to the
FoldingSetNodeID before the load/store information instead of after, so
that it matches what is done elsewhere.
llvm-svn: 37411
2007-06-04 15:49:41 +00:00
Devang Patel
d609374ab3
Fix LLVM build on NetBSD. Patch by Neil Booth.
...
llvm-svn: 37410
2007-06-04 15:28:57 +00:00
Evan Cheng
312b723af2
Let IfConverter loose. Allow more aggressive subsumptions; reorder basic blocks to expose more ifcvt opportunities; code clean up and fixes.
...
llvm-svn: 37409
2007-06-04 06:47:22 +00:00
Evan Cheng
df75785594
Move ReplaceUsesOfBlockWith() out of BranchFolding into a MachineBasicBlock general facility.
...
llvm-svn: 37408
2007-06-04 06:44:01 +00:00
Devang Patel
bdd1aaef10
s/llvm::DominatorTreeBase::DomTreeNode/llvm::DomTreeNode/g
...
llvm-svn: 37407
2007-06-04 00:32:22 +00:00
Owen Anderson
0eca9aad10
Don't use the custom comparator where it's not necessary.
...
llvm-svn: 37406
2007-06-03 22:02:14 +00:00
Anton Korobeynikov
b781886de7
Add comments to fallsthrough cases. Also, this fixes PR1492
...
llvm-svn: 37405
2007-06-03 19:20:49 +00:00
Anton Korobeynikov
8c32c1114f
Check arguments & return types of main(). Abort in case of no match.
...
llvm-svn: 37404
2007-06-03 19:17:35 +00:00
Devang Patel
0e8aa7b69a
s/DominatorTreeBase::Node/DominatorTreeBase:DomTreeNode/g
...
llvm-svn: 37403
2007-06-03 06:26:14 +00:00
Owen Anderson
46499645db
Remove an unused method.
...
llvm-svn: 37402
2007-06-03 05:58:25 +00:00
Owen Anderson
0b68cda302
There's no need to have an Expression class... Value works just as well! This simplifies a lot of code.
...
llvm-svn: 37401
2007-06-03 05:55:58 +00:00
Chris Lattner
446548d2a3
update this entry, now that Anton implemented shift/and lowering for
...
switches. There is one really easy isel thing here with tst we are not
getting.
llvm-svn: 37400
2007-06-02 18:45:14 +00:00
Duncan Sands
f708f73a1b
The semantics of invoke require that we always jump to the unwind block
...
(landing pad) when an exception unwinds through the call. This doesn't
quite match the way the dwarf unwinder works: by default it only jumps to
the landing pad if the catch or filter specification matches, and otherwise
it keeps on unwinding. There are two ways of specifying to the unwinder
that it should "always" (more on why there are quotes here later) jump to
the landing pad: follow the specification by a 0 typeid, or follow it by
the typeid for the NULL typeinfo. GCC does the first, and this patch makes
LLVM do the same as gcc. However there is a problem: the unwinder performs
optimizations based on C++ semantics (it only expects destructors to be
run if the 0 typeid fires - known as "cleanups"), meaning it assumes that no
exceptions will be raised and that the raised exception will be reraised
at the end of the cleanup code. So if someone writes their own LLVM code
using the exception intrinsics they will get a nasty surprise if they don't
follow these rules. The other possibility of using the typeid corresponding
to NULL (catch-all) causes the unwinder to make no assumptions, so this is
probably what we should use in the long-run. However since we are still
having trouble getting exception handling working properly, for the moment
it seems best to closely imitate GCC.
llvm-svn: 37399
2007-06-02 17:16:06 +00:00
Duncan Sands
c063f5f362
Integrate exception filter support and exception catch support. This
...
simplifies the code in DwarfWriter, allows for multiple filters and
makes it trivial to specify filters accompanied by cleanups or catch-all
specifications (see next patch). What a deal! Patch blessed by Anton.
llvm-svn: 37398
2007-06-02 16:53:42 +00:00
Zhou Sheng
0a0ae932ca
Make LowerCTPOP() support arbitrary bitwidth integer type.
...
llvm-svn: 37397
2007-06-02 04:10:33 +00:00
Dale Johannesen
6e7cdce773
Fix CorrectExtraCFGEdges to allow for multiple LandingPad targets.
...
llvm-svn: 37394
2007-06-02 00:08:15 +00:00
Dale Johannesen
9746e3a22b
Fancier algorithm in tail-merge comment implemented, so remove comment.
...
llvm-svn: 37393
2007-06-01 23:04:28 +00:00
Dale Johannesen
3c0a13762d
Implement smarter algorithm for choosing which blocks to tail-merge.
...
See test/CodeGen/X86/test-pic-jtbl.ll for a case where it works well;
shaves another 10K off our favorite benchmark. I was hesitant about
this because of compile speed, but seems to do OK on a bootstrap.
llvm-svn: 37392
2007-06-01 23:02:45 +00:00
Reid Spencer
ff38cf8880
For PR1486:
...
Avoid overwriting the APInt instance with 0 bytes which causes the bitwidth
to be set to 0 (illegal) producing a subsequent assert.
llvm-svn: 37391
2007-06-01 22:23:29 +00:00
Devang Patel
ac54a62fd2
Insert new instructions in AliasSet.
...
llvm-svn: 37390
2007-06-01 22:15:31 +00:00
Owen Anderson
48e93f2ce9
clean() needs to process things in topological order.
...
llvm-svn: 37389
2007-06-01 22:00:37 +00:00
Evan Cheng
9aa5fc8577
Opcode modifier s comes after condition code. e.g. addlts, not addslt.
...
llvm-svn: 37388
2007-06-01 20:51:29 +00:00
Evan Cheng
4dcf1e8582
Correctly mark early-exit on the false path.
...
llvm-svn: 37387
2007-06-01 20:29:21 +00:00
Owen Anderson
4c89142466
Fix Expression comparison, which in turn fixes a value numbering error.
...
llvm-svn: 37386
2007-06-01 17:34:47 +00:00
Evan Cheng
256144de4a
Set ARM ifcvt duplication limit to 3 for now.
...
llvm-svn: 37385
2007-06-01 08:28:59 +00:00
Duncan Sands
706421e712
Since TypeInfos are passed as i8 pointers, a NULL TypeInfo should be passed
...
as a null i8 pointer not as a 0 i32.
llvm-svn: 37383
2007-06-01 08:18:30 +00:00
Evan Cheng
6a2cf070cc
Ifcvt triangle: don't ifcvt 'true' BB if it has other predecessors; don't merge 'false' BB if it has other predecessors.
...
llvm-svn: 37382
2007-06-01 07:41:07 +00:00
Evan Cheng
a2ab4e5feb
Make jumptable non-predicable for now.
...
llvm-svn: 37381
2007-06-01 00:56:15 +00:00
Evan Cheng
95c7917d92
Remove a bogus check. Even terminators in a ifcvt need to be predicated. Unconditional branches can usually be converted to conditional ones.
...
llvm-svn: 37380
2007-06-01 00:55:26 +00:00