Owen Anderson
f988c3ee5c
Change the None and NonLocal markers in memdep to be const.
...
llvm-svn: 40946
2007-08-08 21:39:39 +00:00
Reid Spencer
6f88014eeb
Make it clear that getSTDIN returns null when stdin is empty.
...
llvm-svn: 40940
2007-08-08 20:02:20 +00:00
Evan Cheng
5227e36428
Adding kill info to val#.
...
llvm-svn: 40925
2007-08-08 07:03:29 +00:00
Evan Cheng
02e7fbd7c8
Clean up and bug fix.
...
llvm-svn: 40921
2007-08-08 05:56:18 +00:00
Chris Lattner
65d638a918
reimplement dfs number computation to be significantly faster. This speeds up
...
natural loop canonicalization (which does many cfg xforms) by 4.3x, for
example. This also fixes a bug in postdom dfnumber computation.
llvm-svn: 40920
2007-08-08 05:51:24 +00:00
Evan Cheng
12d72cc1a0
- Each val# can have multiple kills.
...
- Fix some minor bugs related to special markers on val# def. ~0U means
undefined, ~1U means dead val#.
llvm-svn: 40916
2007-08-08 03:00:28 +00:00
Evan Cheng
0182b495fd
- LiveInterval value#'s now have 3 components: def instruction #,
...
kill instruction #, and source register number (iff the value# is defined by a
copy).
- Now def instruction # is set for every value#, not just for copy defined ones.
- Update some outdated code related inactive live ranges.
- Kill info not yet set. That's next patch.
llvm-svn: 40913
2007-08-07 23:49:57 +00:00
Devang Patel
8289b6e663
Fix comment.
...
llvm-svn: 40911
2007-08-07 23:16:03 +00:00
Owen Anderson
d0c7aad800
Get rid of unnecessary #include.
...
llvm-svn: 40885
2007-08-07 00:38:16 +00:00
Owen Anderson
22d94da65b
Clean up a bunch of caching stuff in memdep. This reduces the time to run GVN
...
on 403.gcc from ~15s to ~10s.
llvm-svn: 40884
2007-08-07 00:33:45 +00:00
Devang Patel
228dc09ff6
Begin loop index split pass.
...
llvm-svn: 40883
2007-08-07 00:25:56 +00:00
Chris Lattner
fb1e3a7d2c
remove #if 0 code.
...
llvm-svn: 40880
2007-08-06 22:03:19 +00:00
Chris Lattner
cce6cf78e4
remove #if 0 code.
...
llvm-svn: 40879
2007-08-06 22:01:53 +00:00
Chandler Carruth
e717210757
This fixes resizing issues with BitVectors. It ensures that the BitWord type and type size is always used, and ensures completely correct clearing of unused high bits, and setting of bits when resizing. It should resolve PR1563.
...
llvm-svn: 40871
2007-08-06 20:52:17 +00:00
Reid Spencer
5b204d32f8
@verbatim needs to be on a line by itself.
...
llvm-svn: 40865
2007-08-06 17:10:29 +00:00
Christopher Lamb
8875f43912
Implement review feedback. No functionality change.
...
llvm-svn: 40863
2007-08-06 16:33:56 +00:00
Chris Lattner
99df553268
Various random cleanups, add two accessors to DomTreeNode: getDFSNumIn/getDFSNumOut
...
llvm-svn: 40856
2007-08-06 06:15:43 +00:00
Reid Spencer
3e54e72ef1
Fix minor doxygen nits.
...
llvm-svn: 40854
2007-08-05 20:06:04 +00:00
Reid Spencer
2a23af68c8
Document a missing parameter.
...
llvm-svn: 40852
2007-08-05 19:36:39 +00:00
Chris Lattner
ab61b6f01e
Fix a bug in DenseMap::clear, where we never reset a tombstone
...
to EmptyKey.
llvm-svn: 40839
2007-08-05 08:43:36 +00:00
Chris Lattner
10db9656ba
When clearing a SmallPtrSet, if the set had a huge capacity, but the
...
contents of the set were small, deallocate and shrink the set. This
avoids having us to memset as much data, significantly speeding up
some pathological cases. For example, this speeds up the verifier
from 0.3899s to 0.0763 (5.1x) on the testcase from PR1432 in a
release build.
llvm-svn: 40837
2007-08-05 07:32:14 +00:00
Chris Lattner
a5a692b9bb
Switch the internal "Info" map from an std::map to a DenseMap. This
...
speeds up idom by about 45% and postidom by about 33%.
Some extra precautions must be taken not to invalidate densemap iterators.
llvm-svn: 40827
2007-08-05 00:02:00 +00:00
Chris Lattner
5912537997
switch the DomTreeNodes and IDoms maps in idom/postidom to a
...
DenseMap instead of an std::map. This speeds up postdomtree
by about 25% and domtree by about 23%. It also speeds up clients,
for example, domfrontier by 11%, mem2reg by 4% and ADCE by 6%.
llvm-svn: 40826
2007-08-04 23:48:07 +00:00
Chandler Carruth
00e56b0e81
This is the patch to provide clean intrinsic function overloading support in LLVM. It cleans up the intrinsic definitions and generally smooths the process for more complicated intrinsic writing. It will be used by the upcoming atomic intrinsics as well as vector and float intrinsics in the future.
...
This also changes the syntax for llvm.bswap, llvm.part.set, llvm.part.select, and llvm.ct* intrinsics. They are automatically upgraded by both the LLVM ASM reader and the bitcode reader. The test cases have been updated, with special tests added to ensure the automatic upgrading is supported.
llvm-svn: 40807
2007-08-04 01:51:18 +00:00
Dale Johannesen
976a1cf6cf
long double patch 3 of N. Add to MVT.
...
llvm-svn: 40793
2007-08-03 20:51:37 +00:00
Dale Johannesen
dda00eb44d
Long double, part 1 of N. Support in IR.
...
llvm-svn: 40774
2007-08-03 01:03:46 +00:00
Anders Carlsson
122059b2e9
Fix bug spotted by Chris.
...
llvm-svn: 40725
2007-08-02 06:05:19 +00:00
Anders Carlsson
89ea07e724
Add extend and extOrTrunc methods that do sign or zero extension depending on whether the integer is signed or not
...
llvm-svn: 40724
2007-08-02 06:00:13 +00:00
Evan Cheng
a06b9cf09f
Do not emit copies for physical register output if it's not used.
...
llvm-svn: 40722
2007-08-02 05:29:38 +00:00
Evan Cheng
14bd520741
Instead of adding copyfromreg's to handle physical definitions. Now isel can
...
simply specify them as results and let scheduledag handle them. That
is, instead of
SDOperand Flag = DAG.getTargetNode(Opc, MVT::i32, MVT::Flag, ...)
SDOperand Result = DAG.getCopyFromReg(Chain, X86::EAX, MVT::i32, Flag)
Just write:
SDOperand Result = DAG.getTargetNode(Opc, MVT::i32, MVT::i32, ...)
And let scheduledag emit the move from X86::EAX to a virtual register.
llvm-svn: 40710
2007-08-02 00:28:15 +00:00
Evan Cheng
8f126e59f5
Added TargetInstrDescriptor::numDefs - num of results.
...
llvm-svn: 40709
2007-08-02 00:20:17 +00:00
Owen Anderson
7028dfaf9d
Make non-local memdep not be recursive, and fix a bug on 403.gcc that this exposed.
...
llvm-svn: 40692
2007-08-01 22:01:54 +00:00
Dan Gohman
7dd04fb91c
More explicit keywords.
...
llvm-svn: 40673
2007-08-01 15:32:29 +00:00
Dan Gohman
53bb686577
Make ImmutablePass::runOnModule non-virtual, since it is not
...
intended to be overridden.
llvm-svn: 40671
2007-08-01 14:28:20 +00:00
Owen Anderson
58e64df595
Rename FastDSE to just DSE.
...
llvm-svn: 40668
2007-08-01 06:36:51 +00:00
David Greene
f06a395bb9
New CallInst interface to address GLIBCXX_DEBUG errors caused by
...
indexing an empty std::vector.
Updates to all clients.
llvm-svn: 40660
2007-08-01 03:43:44 +00:00
David Greene
4251f42689
Fix GLIBCXX_DEBUG error owing to dereference of end iterator. There's
...
no guarantee that an instruction returned by getDependency exists in
the maps.
llvm-svn: 40647
2007-07-31 20:01:27 +00:00
Devang Patel
6dd3a5f747
Introduce Simple Analysis interface for loop passes.
...
Right now, this interface provides hooks for only to operations, 1) clone basic block 2) delete value.
llvm-svn: 40625
2007-07-31 08:00:57 +00:00
Anton Korobeynikov
13fd2f7128
Add detection of __dso_handle presence during configure. Use this information in the
...
JITer (short path is added for darwin). This is needed to properly JIT llvm-gcc-4.2-built
binaries, since cxa_atexit is enabled by default on much more targets.
llvm-svn: 40600
2007-07-30 20:02:02 +00:00
Dan Gohman
51e7be7b8f
Fix the comments for the 'fast' parameter in addPassesToEmitFile.
...
llvm-svn: 40592
2007-07-30 15:04:59 +00:00
Dan Gohman
23f9a3ad3b
Fix the comment for getClosestTargetForJIT to reflect the fact that
...
it does not have a Module parameter.
llvm-svn: 40590
2007-07-30 14:58:59 +00:00
Dan Gohman
75473b49ea
More explicit keywords.
...
llvm-svn: 40589
2007-07-30 14:51:59 +00:00
Dan Gohman
b757cdd2e6
Fix pastos in comments for doFinalization functions.
...
llvm-svn: 40588
2007-07-30 14:51:13 +00:00
Devang Patel
780ecf20d1
Add facility to dump pass manager structure
...
to make it easier to understand failure.
llvm-svn: 40567
2007-07-27 20:06:09 +00:00
Devang Patel
a03e82d7ee
Use SmallPtrSet.
...
llvm-svn: 40560
2007-07-27 18:34:27 +00:00
Owen Anderson
997b15d967
Allow SmallPtrSet to hold pointers to const data.
...
llvm-svn: 40556
2007-07-27 18:07:02 +00:00
Duncan Sands
e8bb2c6d32
Support for trampolines, except for X86 codegen which is
...
still under discussion.
llvm-svn: 40549
2007-07-27 12:58:54 +00:00
Christopher Lamb
258dab5389
Add a MachineFunction pass, which runs post register allocation, that turns subreg insert/extract instruction into register copies. This ensures correct code gen if the coalescer isn't able to remove all subreg instructions.
...
llvm-svn: 40521
2007-07-26 08:18:32 +00:00
Christopher Lamb
08bcd5c0f8
Teach DAG scheduling how to properly emit subreg insert/extract machine instructions. PR1350
...
llvm-svn: 40520
2007-07-26 08:12:07 +00:00
Christopher Lamb
7bef240f69
Have register info provide the inverse mapping of register->superregisters. PR1350
...
llvm-svn: 40519
2007-07-26 08:01:58 +00:00
Christopher Lamb
9a0d88efde
Add target independent MachineInstr's to represent subreg insert/extract in MBB's. PR1350
...
llvm-svn: 40518
2007-07-26 07:48:21 +00:00
Christopher Lamb
73c3cd47cc
Add selection DAG nodes for subreg insert/extract. PR1350
...
llvm-svn: 40516
2007-07-26 07:34:40 +00:00
Christopher Lamb
2d47a6faec
Fix 80 col violation.
...
llvm-svn: 40515
2007-07-26 07:03:08 +00:00
Christopher Lamb
cb63a77a51
Remove subreg index from MachineInstr's and also keep vregs as unsigned when adding operands.
...
llvm-svn: 40514
2007-07-26 07:00:46 +00:00
Christopher Lamb
fb7a157ebc
Fix comments for new types.
...
llvm-svn: 40507
2007-07-26 01:48:57 +00:00
Christopher Lamb
f3881994a7
Add support for 3 element 32-bit vector ValueTypes.
...
llvm-svn: 40506
2007-07-26 01:46:52 +00:00
Evan Cheng
4b747bb6a0
EmitAlignment() also emits optional fill value.
...
llvm-svn: 40500
2007-07-25 23:35:07 +00:00
Owen Anderson
906d9d4a10
Forgot to include this file in my last commit.
...
llvm-svn: 40496
2007-07-25 21:30:15 +00:00
Owen Anderson
6a1a8d05b8
Add basic support for performing whole-function RLE.
...
Note: This has not yet been thoroughly tested. Use at your own risk.
llvm-svn: 40489
2007-07-25 19:57:03 +00:00
Devang Patel
d7b401bafd
Add BasicInliner interface.
...
This interface allows clients to inline bunch of functions with module
level call graph information.:wq
llvm-svn: 40486
2007-07-25 18:00:25 +00:00
Dan Gohman
1444c5840b
Add const to CanBeFoldedBy, CheckAndMask, and CheckOrMask.
...
llvm-svn: 40480
2007-07-24 23:00:27 +00:00
Owen Anderson
b9ad251288
Add initial support for non-local memory dependence analysis.
...
NOTE: This has only been cursorily tested. Expected improvements soon.
llvm-svn: 40476
2007-07-24 21:52:37 +00:00
Owen Anderson
eb9f1b612c
Add a GVN pass, using the value numbering code I developed for GVNPRE and the
...
load elimination code from RedundantLoadElimination.
llvm-svn: 40469
2007-07-24 17:55:58 +00:00
Owen Anderson
5969a3cb91
Rename a lot of things to change FastDLE to RedundantLoadElimination.
...
llvm-svn: 40457
2007-07-24 00:17:04 +00:00
Owen Anderson
8523f2d7c4
Forgot to commit this file.
...
llvm-svn: 40447
2007-07-23 22:00:03 +00:00
Owen Anderson
0448fc9e66
Fix a comment.
...
llvm-svn: 40446
2007-07-23 21:51:37 +00:00
Owen Anderson
bd3360e856
Add FastDLE, the load-elimination counterpart of FastDSE.
...
llvm-svn: 40445
2007-07-23 21:48:08 +00:00
Bill Wendling
97342a9b0c
Add missing SSE builtins:
...
__builtin_ia32_cvtss2si64
__builtin_ia32_cvttss2si64
__builtin_ia32_cvtsi642ss
__builtin_ia32_cvtsd2si64
__builtin_ia32_cvttsd2si64
__builtin_ia32_cvtsi642sd
llvm-svn: 40411
2007-07-23 03:07:27 +00:00
Chris Lattner
06bdb78751
Disable the string map copy ctor and assignment operators,
...
they don't do the right thing.
Implement StringMap::erase.
Fix a nasty bug in the default ctor.
llvm-svn: 40395
2007-07-22 20:08:01 +00:00
Dan Gohman
ac8ccab48f
Don't assume that only Uses can be kills. Defs are marked as kills initially
...
when there are no uses. This fixes a dangling-pointer bug, where pointers to
deleted instructions were not removed from kills lists. More info here:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2007-July/009749.html
llvm-svn: 40131
2007-07-20 23:17:34 +00:00
Dan Gohman
d1cc67ea8d
Simplify the logic for setVolatile.
...
llvm-svn: 40130
2007-07-20 23:14:50 +00:00
Evan Cheng
cdb4e7949f
Added -print-emitted-asm to print out JIT generated asm to cerr.
...
llvm-svn: 40123
2007-07-20 21:56:13 +00:00
Owen Anderson
2ceefaf94d
Make the heuristic for shrinking DenseMap smarter.
...
llvm-svn: 40114
2007-07-20 18:56:46 +00:00
Devang Patel
133b5cb6b6
Use SmallVector instead of std::vector.
...
llvm-svn: 40109
2007-07-20 18:04:54 +00:00
Owen Anderson
07f3b97796
Have DenseMap auto-shrink itself on clear(). This improves the time to optimize
...
403.gcc from 15.2s to 14.3s.
llvm-svn: 40100
2007-07-20 16:15:24 +00:00
Devang Patel
45675e56ad
Verify loop info.
...
llvm-svn: 40062
2007-07-19 18:02:32 +00:00
Anton Korobeynikov
609ef3bdb9
Properly initialize value :)
...
llvm-svn: 40059
2007-07-19 15:32:47 +00:00
Devang Patel
9c100bc7e9
Set up ground work to verify preserved analysis info.
...
llvm-svn: 40039
2007-07-19 05:36:09 +00:00
Dan Gohman
4d64f82ab5
Add constructor overloads for LoadInst and StoreInst that insert at the
...
end of a BasicBlock and have an alignment parameter.
llvm-svn: 40016
2007-07-18 20:51:11 +00:00
Reid Spencer
3dd7b1699b
Unbreak the build by putting calls to free into the implementation file and
...
having that implementation file #include <cstdlib>.
llvm-svn: 39952
2007-07-17 02:16:12 +00:00
Owen Anderson
efc00e35cf
Add support for walking up memory def chains, which enables finding many more
...
dead stores on 400.perlbench.
llvm-svn: 39929
2007-07-16 21:52:50 +00:00
Owen Anderson
f01c29815d
Use realloc() to (potentially) resize the contents of SmallPtrSet in place.
...
llvm-svn: 39926
2007-07-16 21:27:44 +00:00
Dan Gohman
0ba554c0c8
Fix comments about vectors to use the current wording.
...
llvm-svn: 39921
2007-07-16 14:29:03 +00:00
Nick Lewycky
43e5fd5be7
Handle decrementing loops properly. Fixes PR1533.
...
Always pass the constant as the second parameter to HowManyLessThans.
Remove obsolete "isSigned" parameter.
llvm-svn: 39893
2007-07-16 02:08:00 +00:00
Chris Lattner
03bc1d9018
add a helper method.
...
llvm-svn: 39885
2007-07-15 23:32:03 +00:00
Nick Lewycky
701e227136
Clarify the language. Pointed out by Duncan Sands.
...
llvm-svn: 39857
2007-07-14 17:41:03 +00:00
Anton Korobeynikov
5635277c36
Long live the exception handling!
...
This patch fills the last necessary bits to enable exceptions
handling in LLVM. Currently only on x86-32/linux.
In fact, this patch adds necessary intrinsics (and their lowering) which
represent really weird target-specific gcc builtins used inside unwinder.
After corresponding llvm-gcc patch will land (easy) exceptions should be
more or less workable. However, exceptions handling support should not be
thought as 'finished': I expect many small and not so small glitches
everywhere.
llvm-svn: 39855
2007-07-14 14:06:15 +00:00
Nick Lewycky
42e8a060a0
Add alternate ConstantRange intersection algorithm.
...
llvm-svn: 39851
2007-07-14 02:51:34 +00:00
Devang Patel
9166ad7658
Make LCSSA a loop pass.
...
llvm-svn: 39844
2007-07-13 23:57:11 +00:00
Dale Johannesen
469ed8e17e
Skeleton of post-RA scheduler; doesn't do anything yet.
...
Change name of -sched option and DEBUG_TYPE to
pre-RA-sched; adjust testcases.
llvm-svn: 39816
2007-07-13 17:13:54 +00:00
Reid Spencer
09aba24630
Regenerate to pick up Gabor's changes.
...
llvm-svn: 39802
2007-07-13 10:05:30 +00:00
Tanya Lattner
a715bbe152
Adding ability to demote phi to stack.
...
llvm-svn: 39744
2007-07-11 18:41:34 +00:00
Owen Anderson
1eaba31f12
Add FastDSE, a new algorithm for doing dead store elimination. This algorithm is not as accurate
...
as the current DSE, but it only a linear scan over each block, rather than quadratic. Eventually
(once it has been improved somewhat), this will replace the current DSE.
NOTE: This has not yet been extensively tested.
llvm-svn: 38517
2007-07-11 00:46:18 +00:00
Evan Cheng
6125079452
Add OptionalDefOperand. Remove clobbersPred. Also add DefinesPredicate to be used by if-converter.
...
llvm-svn: 38499
2007-07-10 18:06:29 +00:00
Owen Anderson
1f5fb875b6
Add support for finding the dependencies of call and invoke instructions.
...
llvm-svn: 38497
2007-07-10 17:59:22 +00:00
Owen Anderson
1fabbda503
Fix a bunch of things from Chris' feedback
...
llvm-svn: 38493
2007-07-10 17:08:11 +00:00
Evan Cheng
cf3b1c89a9
When a node value is only used by a CopyToReg, use the user's dest. This should not be restricted to nodes that produce only a single value.
...
llvm-svn: 38485
2007-07-10 07:08:32 +00:00
Evan Cheng
23dc96f640
Move DenseMapKeyInfo<SDOperand> from LegalizeDAG.cpp to SelectionDAGNodes.h
...
llvm-svn: 38484
2007-07-10 06:59:55 +00:00
Owen Anderson
31eaa152b8
Evidently my earlier fix did not go far enough. When resizing a zero-sized
...
BitVector, make sure to set or clear ALL of the bits.
llvm-svn: 38481
2007-07-10 02:01:16 +00:00
Owen Anderson
1ab53d5ee7
When resizing a BitVector with size 0, be sure to clear the low word before using it.
...
llvm-svn: 38476
2007-07-09 23:39:39 +00:00
Devang Patel
65f3717db9
Expose struct size threhold to allow users to tweak their own setting.
...
llvm-svn: 38472
2007-07-09 21:19:23 +00:00
Owen Anderson
e48ed4f7a8
Make the assignment operator for SmallPtrSet return a reference, and fix a long-standing bug in the copy
...
ctor while I'm at it.
Thanks to Chris Lattner for help with this patch.
llvm-svn: 38470
2007-07-09 20:59:01 +00:00
Devang Patel
f1b6294e80
Fix memory leak.
...
llvm-svn: 38469
2007-07-09 20:52:39 +00:00
Chris Lattner
39e93bf0e0
work around an aparent gcc name resolution bug by
...
detemplatizing this.
llvm-svn: 38461
2007-07-09 17:11:53 +00:00
Chris Lattner
97ba0c99ed
implement operator= for smallptrset
...
llvm-svn: 38460
2007-07-09 16:54:03 +00:00
Dan Gohman
4e45063081
Move the APInt form of SCEVUnknown::getIntegerSCEV to SCEVConstant::get, and
...
use SCEVConstant::get instead of SCEVUnknown::get when constructing a SCEV
for a ConstantInt.
llvm-svn: 38457
2007-07-09 15:25:17 +00:00
Dan Gohman
3f7558673e
Fix a typo in a comment.
...
llvm-svn: 38456
2007-07-09 15:15:24 +00:00
Gabor Greif
0c10b17f03
missed this one
...
llvm-svn: 38454
2007-07-09 12:20:30 +00:00
Gabor Greif
89919e17b4
fix typos
...
llvm-svn: 38453
2007-07-09 12:00:59 +00:00
Owen Anderson
23d5d3add4
A first stab at memory dependence analysis. This is an interface on top of
...
alias analysis, adding caching and lazy computation of queries. This will
be used in planned improvements to memory access optimizations.
llvm-svn: 37958
2007-07-06 23:14:35 +00:00
Owen Anderson
6644d23a16
Add some accessors to improve consistency.
...
llvm-svn: 37957
2007-07-06 23:13:31 +00:00
Devang Patel
d9043c7501
Add SplitEdge and SplitBlock utility routines.
...
llvm-svn: 37952
2007-07-06 21:39:20 +00:00
Gabor Greif
018330fd12
finishing touches of bytecode -> bitcode changes. also unbreak Windows
...
llvm-svn: 37950
2007-07-06 20:28:40 +00:00
Dan Gohman
61966b8551
Remove redundant declarations.
...
llvm-svn: 37946
2007-07-06 13:59:28 +00:00
Gabor Greif
f5e225a756
eliminate residual cruft related to recognizing bytecode
...
files.
bitcode files are the only LLVM format left.
llvm-svn: 37945
2007-07-06 13:38:17 +00:00
Dan Gohman
dd89857d45
Fix a comment so that the element numbering match the actual element
...
operand numbering.
llvm-svn: 37944
2007-07-06 13:27:33 +00:00
Rafael Espindola
7b3de98989
Add the byval attribute
...
llvm-svn: 37940
2007-07-06 10:57:03 +00:00
Dan Gohman
a83ac4f3b4
Add explicit keywords.
...
llvm-svn: 37925
2007-07-05 20:40:15 +00:00
Dan Gohman
98470536ff
Make MachineFunctionPass::runOnFunction non-virtual. Subclasses override
...
the virtual function runOnMachineFunction instead. And add access specifiers.
llvm-svn: 37924
2007-07-05 20:39:35 +00:00
Gabor Greif
5f705671e4
Here is the bulk of the sanitizing.
...
Almost all occurrences of "bytecode" in the sources have been eliminated.
llvm-svn: 37913
2007-07-05 17:07:56 +00:00
Duncan Sands
eca2fa295b
Make sure only one copy of a filter is placed in the
...
exception handling table if we encounter it multiple
times. Filters could be folded harder than this, but
that would mean a lot more work for not much gain.
llvm-svn: 37908
2007-07-05 15:15:01 +00:00
Duncan Sands
4441eff1ac
Extend eh.selector to support both catches and filters.
...
Drop the eh.filter intrinsic.
llvm-svn: 37875
2007-07-04 20:52:51 +00:00
Devang Patel
7d791bb10c
Remove unused method - getIDomBlock().
...
llvm-svn: 37865
2007-07-04 01:11:19 +00:00
Devang Patel
6e6a5c1893
Fix typo in assertion check.
...
llvm-svn: 37864
2007-07-04 01:05:22 +00:00
Dan Gohman
7cf351b873
Remove declarations for code no longer in the tree, to avoid confusion.
...
llvm-svn: 37840
2007-07-02 15:06:26 +00:00
Dan Gohman
048c6f805b
Add explicit keywords.
...
llvm-svn: 37839
2007-07-02 14:53:37 +00:00
Devang Patel
593a23252d
Add loop info verification mechanism.
...
llvm-svn: 37822
2007-06-29 23:13:42 +00:00
Dan Gohman
2d36dfca67
Add an explicit keyword. Thanks Chris!
...
llvm-svn: 37819
2007-06-29 22:16:25 +00:00
John Criswell
57e5ed4b5a
Convert .cvsignore files
...
llvm-svn: 37801
2007-06-29 16:35:07 +00:00
David Greene
ad230f223f
Fix misue of iterator pointing to erased object. Uncovered by
...
_GLIBCXX_DEBUG.
llvm-svn: 37793
2007-06-29 02:45:24 +00:00
Dan Gohman
c6bdcfa8c0
Add new TargetLowering code to provide the final register type that an
...
illegal value type will be transformed to, for code that needs the
register type after all transformations instead of just after the first
transformation.
Factor out the code that uses this information to do copy-from-regs and
copy-to-regs for various purposes into separate functions so that they
are done consistently.
llvm-svn: 37781
2007-06-28 23:29:44 +00:00
Dan Gohman
d2a3725004
Add a default parameter to a SmallVector constructor to allow it to
...
be called with just an initial length value, just like in std::vector.
llvm-svn: 37779
2007-06-28 20:27:24 +00:00
Devang Patel
2f757c3a96
Remove unnecessary comments.
...
llvm-svn: 37774
2007-06-28 02:11:54 +00:00
Devang Patel
ce4ea8a62c
Handle the case when block dominates itself.
...
llvm-svn: 37773
2007-06-28 02:07:08 +00:00
Devang Patel
28d2851f39
Remove ETForest.
...
llvm-svn: 37765
2007-06-27 20:53:52 +00:00
Dan Gohman
cb89e19a6d
Rename ("shrinkify") MVT::isExtendedValueType to MVT::isExtendedVT.
...
llvm-svn: 37758
2007-06-27 16:08:04 +00:00
Dan Gohman
63c5bb770c
Document the encoding of MVT::ValueType.
...
llvm-svn: 37757
2007-06-27 15:28:26 +00:00
Dan Gohman
e94ef99437
Allow DOUT to be used outside of the llvm namespace.
...
llvm-svn: 37753
2007-06-27 14:09:38 +00:00
Evan Cheng
30adb50aaf
Add comment.
...
llvm-svn: 37741
2007-06-26 21:19:07 +00:00
Evan Cheng
0eaa723739
Properly handle kills of a physical register which has sub-registers that are read by later instructions.
...
llvm-svn: 37739
2007-06-26 21:03:35 +00:00
Evan Cheng
ac10d44736
Add immediate sub-registers.
...
llvm-svn: 37738
2007-06-26 20:59:16 +00:00
Dan Gohman
eea90f90af
Replace ?: with if statements, for clarity.
...
llvm-svn: 37735
2007-06-26 16:19:08 +00:00
Dan Gohman
99878e810a
Simplify the expression for MVT::isExtendedValueType.
...
llvm-svn: 37733
2007-06-26 15:20:04 +00:00
Dan Gohman
fb8c9beba3
Simplify the expression for TargetLowering::isTypeLegal.
...
llvm-svn: 37732
2007-06-26 15:16:27 +00:00
Dan Gohman
2fa6ce1cd4
Renumber the SimpleValueType values to fill in the hole left by
...
removing MVT::Vector.
llvm-svn: 37730
2007-06-26 14:28:59 +00:00
Dan Gohman
9cbc3fb1ab
Revert the earlier change that removed the M_REMATERIALIZABLE machine
...
instruction flag, and use the flag along with a virtual member function
hook for targets to override if there are instructions that are only
trivially rematerializable with specific operands (i.e. constant pool
loads).
llvm-svn: 37728
2007-06-26 00:48:07 +00:00
Dan Gohman
76d6776c52
Add a convenince member function for appending strings to a module's
...
module-level asm string data.
llvm-svn: 37726
2007-06-26 00:38:49 +00:00
Dan Gohman
354f02e03d
Generalize MVT::ValueType and associated functions to be able to represent
...
extended vector types. Remove the special SDNode opcodes used for pre-legalize
vector operations, and the special MVT::Vector type used with them. Adjust
lowering and legalize to work with the normal SDNode kinds instead, and to
use the normal MVT functions to work with vector types instead of using the
two special operands that the pre-legalize nodes held.
This allows pre-legalize and post-legalize DAGs, and the code that operates
on them, to be more consistent. Pre-legalize vector operators can be handled
more consistently with scalar operators. And, -view-dag-combine1-dags and
-view-legalize-dags now look prettier for vector code.
llvm-svn: 37719
2007-06-25 16:23:39 +00:00
Dan Gohman
a62327ea40
Move ComputeMaskedBits, MaskedValueIsZero, and ComputeNumSignBits from
...
TargetLowering to SelectionDAG so that they have more convenient
access to the current DAG, in preparation for the ValueType routines
being changed from standalone functions to members of SelectionDAG for
the pre-legalize vector type changes.
llvm-svn: 37704
2007-06-22 14:59:07 +00:00
Duraid Madina
fe6e41b4f9
check in the BigBlock local register allocator
...
llvm-svn: 37703
2007-06-22 08:27:12 +00:00
Owen Anderson
907b0a4e10
Have internal df_iterator's use SmallPtrSet instead of std::set. This provides compile time speedups to any pass using df_iterator.
...
llvm-svn: 37694
2007-06-21 21:25:36 +00:00
Devang Patel
bfb1c7192e
Move code to update dominator information after basic block is split
...
from LoopSimplify.cpp to Dominator.cpp
llvm-svn: 37689
2007-06-21 17:23:45 +00:00
Dan Gohman
1815e9bdb3
Rename TargetLowering::getNumElements and friends to
...
TargetLowering::getNumRegisters and similar, to avoid confusion with
the actual number of elements for vector types.
llvm-svn: 37687
2007-06-21 14:42:22 +00:00
Tanya Lattner
6d152cd7df
Move inliner pass header file.
...
llvm-svn: 37664
2007-06-19 22:29:02 +00:00
Dan Gohman
bb705e230a
Rename ScalarEvolution::deleteInstructionFromRecords to
...
deleteValueFromRecords and loosen the types to all it to accept
Value* instead of just Instruction*, since this is what
ScalarEvolution uses internally anyway. This allows more flexibility
for future uses.
llvm-svn: 37657
2007-06-19 14:28:31 +00:00
Dan Gohman
b60d8a92c9
Replace M_REMATERIALIZIBLE and the newly-added isOtherReMaterializableLoad
...
with a general target hook to identify rematerializable instructions. Some
instructions are only rematerializable with specific operands, such as loads
from constant pools, while others are always rematerializable. This hook
allows both to be identified as being rematerializable with the same
mechanism.
llvm-svn: 37644
2007-06-19 01:48:05 +00:00
Evan Cheng
4358a7f1e9
Replace CanBeDuplicated() with a M_NOT_DUPLICABLE bit.
...
llvm-svn: 37642
2007-06-19 01:21:41 +00:00
Chris Lattner
6e631d5d4f
add isvararg tracking to CCState
...
llvm-svn: 37639
2007-06-19 00:10:25 +00:00
Evan Cheng
978058bcd7
Move CorrectExtraCFGEdges() from BranchFolding.cpp to a MachineBasicBlock method.
...
llvm-svn: 37633
2007-06-18 22:43:58 +00:00
Tanya Lattner
fedfcab2ab
Modify annotate intrinsic to take 2 additional args: file and line number.
...
Fix up Annotate attribute test case.
Fix DebugFilename.c test case to look for right file name.
llvm-svn: 37632
2007-06-18 22:23:39 +00:00
Chris Lattner
80de50ac63
add helper
...
llvm-svn: 37631
2007-06-18 21:50:49 +00:00
Dan Gohman
27de646c66
Add keyword explicit.
...
llvm-svn: 37624
2007-06-18 14:11:31 +00:00
Evan Cheng
34a6cb0b2e
Added CanBeDuplicated(). It returns true if an instruction can be safely duplicated (e.g. during ifcvt).
...
llvm-svn: 37605
2007-06-15 21:13:54 +00:00
Tanya Lattner
203b1ae094
Add local var annotation intrinsic.
...
llvm-svn: 37603
2007-06-15 20:50:54 +00:00
Evan Cheng
13a9ca69bc
No longer needed.
...
llvm-svn: 37598
2007-06-15 19:05:13 +00:00
Dan Gohman
838ba27094
Add a SCEV class and supporting code for sign-extend expressions.
...
This created an ambiguity for expandInTy to decide when to use
sign-extension or zero-extension, but it turns out that most of its callers
don't actually need a type conversion, now that LLVM types don't have
explicit signedness. Drop expandInTy in favor of plain expand, and change
the few places that actually need a type conversion to do it themselves.
llvm-svn: 37591
2007-06-15 14:38:12 +00:00
Chris Lattner
1de26b7677
m_not should match vector not
...
llvm-svn: 37587
2007-06-15 06:13:47 +00:00
Chris Lattner
145fdc7e2a
add a Constant::getAllOnesValue helper function, which works on integers
...
AND vectors.
llvm-svn: 37586
2007-06-15 06:10:53 +00:00
Dan Gohman
2fd7d26df8
Rename MVT::getVectorBaseType to MVT::getVectorElementType.
...
llvm-svn: 37579
2007-06-14 22:58:02 +00:00
Dale Johannesen
62f49dd524
Do not treat FP_REG_KILL as terminator in branch analysis (X86).
...
llvm-svn: 37578
2007-06-14 22:03:45 +00:00
Dan Gohman
35f2b4d716
Add a target hook to allow loads from constant pools to be rematerialized, and an
...
implementation for x86.
llvm-svn: 37576
2007-06-14 20:50:44 +00:00
Dan Gohman
74c92798d8
Eliminate some redundant newlines in asm output.
...
llvm-svn: 37574
2007-06-14 15:00:27 +00:00
Christopher Lamb
68017d151b
Add support to tablegen for specifying subregister classes on a per register class basis.
...
llvm-svn: 37572
2007-06-13 22:20:15 +00:00
Dan Gohman
6415b2548e
Introduce new SelectionDAG node opcodes VEXTRACT_SUBVECTOR and
...
VCONCAT_VECTORS. Use these for CopyToReg and CopyFromReg legalizing in
the case that the full register is to be split into subvectors instead
of scalars. This replaces uses of VBIT_CONVERT to present values as
vector-of-vector types in order to make whole subvectors accessible via
BUILD_VECTOR and EXTRACT_VECTOR_ELT.
This is in preparation for adding extended ValueType values, where
having vector-of-vector types is undesirable.
llvm-svn: 37569
2007-06-13 15:12:02 +00:00
Devang Patel
ca555be4ca
Protect updateDFSNumbers()
...
llvm-svn: 37560
2007-06-12 17:30:56 +00:00
Devang Patel
73ae5acfd0
Make DFS number manipulation methods private.
...
llvm-svn: 37553
2007-06-12 05:49:31 +00:00
Devang Patel
ab4cb51479
Break DominatorTree from ETNode.
...
Remove unused PostETForest.
llvm-svn: 37551
2007-06-12 00:54:38 +00:00
Devang Patel
73d23a5f70
Maintain DFS number in DomTreeNode itself.
...
This means now ETNodes are not useful anymore.
llvm-svn: 37546
2007-06-12 00:14:41 +00:00
Devang Patel
bc3887310b
Add and use DominatorTreeBase::findNearestCommonDominator().
...
llvm-svn: 37545
2007-06-11 23:31:22 +00:00
Evan Cheng
1a6c0341fd
Add a utility routine to check for unpredicated terminator instruction.
...
llvm-svn: 37528
2007-06-08 21:59:56 +00:00
Devang Patel
d1a779c4fe
Fix spelling.
...
llvm-svn: 37522
2007-06-08 17:59:02 +00:00
David Greene
6b14050d1e
Factor live variable analysis so it does not do register coalescing
...
simultaneously. Move that pass to SimpleRegisterCoalescing.
This makes it easier to implement alternative register allocation and
coalescing strategies while maintaining reuse of the existing live
interval analysis.
llvm-svn: 37520
2007-06-08 17:18:56 +00:00
Devang Patel
cfb3a761ae
Update LoopSimplify to require and preserve DominatorTree only.
...
Now LoopSimplify does not require nor preserve ETForest.
llvm-svn: 37512
2007-06-08 01:50:32 +00:00
Devang Patel
738f460b18
Add new method - nearestCommonDominator().
...
llvm-svn: 37508
2007-06-08 00:21:17 +00:00
Devang Patel
d544f5262e
Use DominatorTree instead of ETForest.
...
llvm-svn: 37507
2007-06-08 00:17:13 +00:00
Devang Patel
b5554f450a
Do not preserve ETForest.
...
llvm-svn: 37506
2007-06-08 00:02:08 +00:00
Devang Patel
9772222f41
Add instruction level dominates(A,B) interface.
...
llvm-svn: 37504
2007-06-07 23:52:40 +00:00
Devang Patel
3daf3625ab
Do not use ETForest as well as DomiantorTree. DominatorTree is sufficient.
...
llvm-svn: 37501
2007-06-07 22:17:16 +00:00
Devang Patel
a466c96f77
Use DominatorTree instead of ETForest.
...
This allows faster immediate domiantor walk.
llvm-svn: 37500
2007-06-07 21:57:03 +00:00
Devang Patel
3aece48470
Add basic block level properlyDominates(A,B) interface.
...
llvm-svn: 37497
2007-06-07 21:34:22 +00:00
Devang Patel
e63f8b85f7
Add BasicBlock level dominates(A,B) interface.
...
llvm-svn: 37493
2007-06-07 18:39:40 +00:00
Devang Patel
babcd06827
Maintain ETNode as part of DomTreeNode.
...
This adds redundancy for now.
llvm-svn: 37492
2007-06-07 17:47:21 +00:00
Evan Cheng
4de6599e83
Add a machine instruction flag indicating the instruction can clobber condition code / register(s) used to predicate instructions.
...
llvm-svn: 37464
2007-06-06 10:13:55 +00:00
Chris Lattner
a1ad601255
add accessor
...
llvm-svn: 37453
2007-06-06 01:22:09 +00:00
Devang Patel
782ec1fbbb
Break friendship.
...
llvm-svn: 37450
2007-06-06 00:59:48 +00:00
Devang Patel
59091c81b6
Rename.
...
llvm-svn: 37448
2007-06-06 00:49:02 +00:00
Devang Patel
43c684a62d
Simplify class hierarchy.
...
llvm-svn: 37447
2007-06-06 00:46:36 +00:00
Devang Patel
61661c6774
Avoid non-trivial loop unswitching while optimizing for size.
...
llvm-svn: 37446
2007-06-06 00:21:03 +00:00
Zhou Sheng
09b12fef98
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
Devang Patel
ba29e5e591
s/ETNode::getChildren/ETNode::getETNodeChildren/g
...
llvm-svn: 37426
2007-06-04 23:45:02 +00:00
Devang Patel
3ad9b9f927
Add FIXMEs.
...
llvm-svn: 37417
2007-06-04 17:38:00 +00:00
Devang Patel
8faaa37b1a
Remove unused method.
...
llvm-svn: 37416
2007-06-04 16:49:36 +00:00
Devang Patel
74785c1f3c
s/DominatorTree::createNewNode/DominatorTree::addNewBlock/g
...
llvm-svn: 37415
2007-06-04 16:43:25 +00:00
Devang Patel
26d8a86df7
Add basic block level interface to change immediate dominator
...
and create new node.
llvm-svn: 37414
2007-06-04 16:22:33 +00:00
Evan Cheng
0dbe4d04db
Move ReplaceUsesOfBlockWith() out of BranchFolding into a MachineBasicBlock general facility.
...
llvm-svn: 37408
2007-06-04 06:44:01 +00:00
Devang Patel
2ef6caf14f
s/llvm::DominatorTreeBase::DomTreeNode/llvm::DomTreeNode/g
...
llvm-svn: 37407
2007-06-04 00:32:22 +00:00
Devang Patel
d58b82f83a
s/DominatorTreeBase::Node/DominatorTreeBase:DomTreeNode/g
...
llvm-svn: 37403
2007-06-03 06:26:14 +00:00
Duncan Sands
f37bc8207e
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
37925d3f39
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
Evan Cheng
0dc7a8cac6
Target specific ifcvt code duplication limit.
...
llvm-svn: 37384
2007-06-01 08:25:24 +00:00
Chris Lattner
72e07238ba
Fix the asmprinter so that a globalvalue can specify an explicit alignment
...
smaller than the preferred alignment, but so that the target can actually
specify a minimum alignment if needed. This fixes some objc protocol
failures Devang tracked down.
llvm-svn: 37373
2007-05-31 18:57:45 +00:00
Dale Johannesen
1ba04f7d87
Make stable_sort in tail merging actually be stable (it never was, but didn't
...
matter until my last change). Reenable tail merging by default.
llvm-svn: 37354
2007-05-29 23:47:50 +00:00
Owen Anderson
d765ae21f7
Put GVN-PRE in all the right places.
...
llvm-svn: 37352
2007-05-29 23:36:32 +00:00
Evan Cheng
d8b25a2091
Add missing const qualifiers.
...
llvm-svn: 37341
2007-05-29 18:35:22 +00:00
Chris Lattner
da86fddf1f
Add a new LLVMBuilder class, which makes it simpler and more uniform to
...
create large amounts of instructions by separating the insertion point
logic from the logic of what to create.
llvm-svn: 37332
2007-05-27 15:09:34 +00:00
Devang Patel
3eb349409f
Disable Tail Merging for now.
...
llvm-svn: 37329
2007-05-25 01:00:24 +00:00
Dan Gohman
2c5d31ee81
Minor comment cleanups.
...
llvm-svn: 37321
2007-05-24 14:36:04 +00:00
Devang Patel
bf5c49f62c
Add dump() routines for debugging assistance.
...
llvm-svn: 37314
2007-05-23 19:55:36 +00:00
Anton Korobeynikov
0f184e86ab
Mark all calls as "could throw", when exceptions are enabled. Emit necessary LP info too. This fixes PR1439
...
llvm-svn: 37311
2007-05-23 11:08:31 +00:00
Evan Cheng
f2d1d0124e
Add a couple of target hooks for predication.
...
llvm-svn: 37306
2007-05-23 07:19:12 +00:00
Chris Lattner
3928e8e16d
make these accessors private.
...
llvm-svn: 37302
2007-05-23 05:46:04 +00:00
Dale Johannesen
738f94210c
name change requested by review of previous patch
...
llvm-svn: 37289
2007-05-22 18:31:04 +00:00
Dale Johannesen
fe0fe14411
Make tail merging the default, except on powerPC. There was no prior art
...
for a target-dependent default with a command-line override; this way
should be generally usable.
llvm-svn: 37285
2007-05-22 17:14:46 +00:00
Evan Cheng
7d3f771e9c
Consistency.
...
llvm-svn: 37274
2007-05-22 01:21:58 +00:00
Chris Lattner
5565c09a5b
better portability for intptr_t.
...
llvm-svn: 37221
2007-05-18 07:07:05 +00:00
Evan Cheng
234aab208a
RemoveBranch() and InsertBranch() now returns number of instructions deleted / inserted.
...
llvm-svn: 37192
2007-05-18 00:05:48 +00:00
Evan Cheng
3ce37e8d78
Fix comment.
...
llvm-svn: 37191
2007-05-18 00:00:30 +00:00
Evan Cheng
b4cc6606d5
Move isSuccessor() offline, change it to use std::find.
...
llvm-svn: 37190
2007-05-17 23:58:53 +00:00
Dan Gohman
98860888df
Correct a name in a comment.
...
llvm-svn: 37178
2007-05-17 21:30:39 +00:00
Chris Lattner
c68a1721c2
silence some "comparison between signed and unsigned integer expressions"
...
warnings
llvm-svn: 37177
2007-05-17 20:01:40 +00:00
Dan Gohman
2340529c17
Fix some sporadic segfaults that are triggered when SmallVector's heap
...
storage lands near the end of the available address space. In the expression
Begin+N > Capacity, the Begin+N was overflowing. Fix this by replacing it
by with an expression that doesn't involve computation of an address
beyond the end of allocated memory.
llvm-svn: 37171
2007-05-17 18:29:01 +00:00
Evan Cheng
dc9e574073
Remove. Not needed.
...
llvm-svn: 37139
2007-05-17 00:11:35 +00:00
Evan Cheng
3163b77d5e
Add target hook to specify block size limit for if-conversion.
...
llvm-svn: 37134
2007-05-16 23:45:53 +00:00
Evan Cheng
973f4a19cb
PredicateInstruction returns true if the operation was successful.
...
llvm-svn: 37124
2007-05-16 21:53:07 +00:00
Evan Cheng
3b10540b5e
Rename M_PREDICATED to M_PREDICABLE; Move TargetInstrInfo::isPredicatable() to MachineInstr::isPredicable().
...
llvm-svn: 37115
2007-05-16 20:43:42 +00:00
Chris Lattner
db7986458d
add missing mmx intrinsic
...
llvm-svn: 37099
2007-05-16 06:03:49 +00:00
Evan Cheng
770584a8cd
Fix comments.
...
llvm-svn: 37096
2007-05-16 05:09:34 +00:00
Evan Cheng
aafca4d4a2
Initial commit of (very basic) if converter.
...
llvm-svn: 37092
2007-05-16 02:00:57 +00:00
Evan Cheng
7fe6d7cb7e
Add TargetInstrInfo predication hooks.
...
llvm-svn: 37091
2007-05-16 01:58:56 +00:00
Evan Cheng
eea85a767e
Added getNumExplicitOperands and findFirstPredOperand.
...
llvm-svn: 37064
2007-05-15 01:26:09 +00:00
Evan Cheng
71c4d42bd7
All operands that made up of the predicate operands are maked M_PREDICATE_OPERAND.
...
llvm-svn: 37062
2007-05-15 01:21:27 +00:00
Dan Gohman
b0fd1c9640
Correct a comment.
...
llvm-svn: 37058
2007-05-15 00:20:13 +00:00
Evan Cheng
e9e48bcf28
Fix for PR1406:
...
v1 =
r2 = move v1
= op r2<kill>
...
r2 = move v1
= op r2<kill>
Clear the first r2 kill if v1 and r2 are joined.
llvm-svn: 37050
2007-05-14 21:10:05 +00:00
Dan Gohman
17cd3485e1
Use templates for the GraphType for DefaultDOTGraphTraits' members instead
...
of just using void*. This allows it to be used with graph adapters like
Inverse.
llvm-svn: 37032
2007-05-14 14:23:27 +00:00
Dan Gohman
1fba6fb9a8
Add a addRequiredTransitiveID member function, which is to
...
addRequiredTransitive as addRequiredID is to addRequired.
llvm-svn: 37031
2007-05-14 14:21:46 +00:00
Chris Lattner
82c4362a67
update comments
...
llvm-svn: 37027
2007-05-14 01:54:16 +00:00
Reid Spencer
a17d02ad08
Add some things needed by the llvm-gcc version supporting bit accurate integer
...
types:
1. Functions to compute div/rem at the same time.
2. Further assurance that an APInt with 0 bitwidth cannot be constructed.
3. Left and right rotate operations.
4. An exactLogBase2 function which requires an exact power of two or it
returns -1.
llvm-svn: 37025
2007-05-13 23:44:59 +00:00
Anton Korobeynikov
100919126f
Emit multiple common EH frames for multiple (including blank) personality
...
functions. This partly fixes PR1414: now we're restricted only to one
personality function per eh frame, not per module. Further work on
"multiple personalities" topic needs representative example.
llvm-svn: 37018
2007-05-13 15:42:26 +00:00
Anton Korobeynikov
7daaf71b29
More DWARF-related things cleanup:
...
1. Fix PR1380
2. Apply Duncan's patch from PR1410
3. Insert workaround for "one personality function per module" as noted in PR1414
4. Emit correct debug frames for x86/linux. This partly fixes DebugInfo/2006-11-06-StackTrace.cpp: stack trace is
shown correctly, but arguments for function on top of stack are displayed incorrectly.
llvm-svn: 37015
2007-05-12 22:36:25 +00:00
Dan Gohman
19d23d8595
Remove forward-declarations for classes that don't exist.
...
llvm-svn: 36993
2007-05-11 21:05:57 +00:00
Dan Gohman
c0617dde90
Add explicit keywords to several constructors that now have one argument.
...
llvm-svn: 36992
2007-05-11 21:04:48 +00:00
Dan Gohman
fad75ac3af
Simplify BranchInst::getSuccessor, avoiding a conditional operator.
...
llvm-svn: 36991
2007-05-11 20:59:29 +00:00
Anton Korobeynikov
0a29b65e0c
Allow multiple invokes per landing pad. This (probably) fixes PR1410.
...
llvm-svn: 36977
2007-05-10 22:34:59 +00:00
Evan Cheng
855b26b72e
Eliminate MarkVirtRegAliveInBlock recursion.
...
llvm-svn: 36943
2007-05-08 19:00:00 +00:00
Evan Cheng
abe2299a19
Add MachineBasicBlock preds / succs reverse iterators.
...
llvm-svn: 36942
2007-05-08 18:55:03 +00:00
Chris Lattner
114dad2f8f
update comments, no functionality change
...
llvm-svn: 36929
2007-05-08 05:38:32 +00:00
Jeff Cohen
2e8263c013
Unbreak VC++ build.
...
llvm-svn: 36901
2007-05-07 15:21:46 +00:00
Chris Lattner
112d26a164
Enhance MemoryBuffer to return error messages in strings if they occur.
...
llvm-svn: 36899
2007-05-06 23:32:36 +00:00
Chris Lattner
5ca60f2489
remove bytecode headers
...
llvm-svn: 36885
2007-05-06 19:47:36 +00:00
Chris Lattner
7dbcbe7af5
remove dead header
...
llvm-svn: 36884
2007-05-06 19:46:23 +00:00
Nick Lewycky
c2306ff5b4
Fix typo in comment.
...
llvm-svn: 36873
2007-05-06 13:37:16 +00:00
Chris Lattner
6cfc34329b
Move this here from Bytecode/Archive.h
...
llvm-svn: 36865
2007-05-06 09:14:53 +00:00
Chris Lattner
87753518a9
allow zero-length arrays
...
llvm-svn: 36863
2007-05-06 08:22:10 +00:00
Chris Lattner
37779a0b4c
we aren't at the end of stream until we've consumed all the bytes AND all
...
the bits in those bytes.
llvm-svn: 36861
2007-05-06 08:12:09 +00:00
Chris Lattner
ae80a1de2f
add support for identifying bitcode files
...
llvm-svn: 36845
2007-05-06 05:30:10 +00:00
Chris Lattner
cee444cf93
Add a helper that either opens a file or stdin.
...
llvm-svn: 36835
2007-05-06 04:41:59 +00:00
Jeff Cohen
0b108b4f29
Make code more 64-bit aware.
...
llvm-svn: 36833
2007-05-06 03:24:19 +00:00
Jeff Cohen
ce844b2aaa
Unbreak VC++.
...
llvm-svn: 36831
2007-05-06 03:12:47 +00:00
Chris Lattner
bf23240f44
add a new CreateBitcodeWriterPass method, which creates a bitcode writer as
...
a pass
llvm-svn: 36828
2007-05-06 02:30:12 +00:00
Chris Lattner
c9ca38fedf
add inline asm code
...
llvm-svn: 36826
2007-05-06 01:50:11 +00:00
Chris Lattner
2753e54f7b
Fix a subtle bug that prevented round-tripping 470.lbm
...
llvm-svn: 36825
2007-05-06 01:43:38 +00:00
Chris Lattner
6d0c5eb739
add a denser encoding for null terminated strings, add a 6-bit abbrev as
...
well. This shrinks kc++ from 2724088 to 2717360 bytes.
llvm-svn: 36821
2007-05-06 00:53:07 +00:00
Chris Lattner
34b256e1a6
implement the 'string constant' optimization. This shrinks kc.bit from
...
2878544 to 2815788
llvm-svn: 36818
2007-05-06 00:35:24 +00:00
Chris Lattner
9818d0a7e6
fix a bug I introduced when I merged some code together
...
llvm-svn: 36813
2007-05-05 23:40:48 +00:00
Anton Korobeynikov
ce48606d7a
Emit sections/directives in the proper order. This fixes PR1376. Also,
...
some small cleanup was made.
llvm-svn: 36780
2007-05-05 09:04:50 +00:00
Chris Lattner
7d16cb364d
minor bugfix
...
llvm-svn: 36777
2007-05-05 07:20:34 +00:00
Chris Lattner
cedc5577f2
add a 6-bit encoding type for strings.
...
llvm-svn: 36770
2007-05-05 01:15:42 +00:00
Chris Lattner
eca2bb1334
Implement support for globally associating abbrevs with block IDs, which
...
relieves us from having to emit the abbrevs into each instance of the block.
This shrinks kc.bit from 3368K to 3333K, but will be a more significant win
once instructions are abbreviated.
The VST went from:
Block ID #14 (VALUE_SYMTAB):
Num Instances: 2345
Total Size: 1.29508e+07b/1.61885e+06B/404713W
Average Size: 5522.73b/690.342B/172.585W
% of file: 48.0645
Tot/Avg SubBlocks: 0/0
Tot/Avg Abbrevs: 7035/3
Tot/Avg Records: 120924/51.5667
% Abbrev Recs: 100
to:
Block ID #14 (VALUE_SYMTAB):
Num Instances: 2345
Total Size: 1.26713e+07b/1.58391e+06B/395978W
Average Size: 5403.53b/675.442B/168.86W
% of file: 47.5198
Tot/Avg SubBlocks: 0/0
Tot/Avg Abbrevs: 0/0
Tot/Avg Records: 120924/51.5667
% Abbrev Recs: 100
because we didn't emit the same 3 abbrevs 2345 times :)
llvm-svn: 36767
2007-05-05 00:17:00 +00:00
Chris Lattner
e2b2272c53
use a template to eliminate manual code duplication
...
llvm-svn: 36757
2007-05-04 20:40:50 +00:00
Bill Wendling
dc82c5a195
Add an "implies" field to features. This indicates that, if the current
...
feature is set, then the features in the implied list should be set also.
The opposite is also enforced: if a feature in the implied list isn't set,
then the feature that owns that implies list shouldn't be set either.
llvm-svn: 36756
2007-05-04 20:38:40 +00:00
Chris Lattner
75b84adf6b
add support for array abbreviations.
...
llvm-svn: 36754
2007-05-04 20:33:47 +00:00
Chris Lattner
a4aa2e9b7a
eliminate lengths from record bodies
...
llvm-svn: 36751
2007-05-04 19:10:48 +00:00
Chris Lattner
4e0c6003b7
minor cleanups. Add provisions for a new standard BLOCKINFO_BLOCK
...
block type.
llvm-svn: 36748
2007-05-04 18:25:49 +00:00
Chris Lattner
f0086ffafa
refcount BitCodeAbbrev objects
...
llvm-svn: 36747
2007-05-04 17:35:19 +00:00
Chris Lattner
da3b0264f7
if functiontype is going to have a pointer to a paramattr object, it better
...
be const. The only way to get a pointer to these returns a const pointer.
llvm-svn: 36734
2007-05-04 03:39:28 +00:00
Chris Lattner
b973c9b64e
add a helper
...
llvm-svn: 36729
2007-05-04 03:13:39 +00:00
Chris Lattner
bb8d1755f6
remove unused code
...
llvm-svn: 36727
2007-05-04 03:01:46 +00:00
Chris Lattner
2d0c97d9a1
add new codes
...
llvm-svn: 36725
2007-05-04 03:00:00 +00:00
Chris Lattner
43c70c8404
add a new code
...
llvm-svn: 36703
2007-05-03 22:16:11 +00:00
Jeff Cohen
d59084b6f6
Unbreak VC++ build.
...
llvm-svn: 36700
2007-05-03 22:09:21 +00:00
Devang Patel
e0b9bd0e49
Use iterative while loop instead of recursive function call.
...
llvm-svn: 36694
2007-05-03 20:55:18 +00:00
Dan Gohman
793c6e2d5e
Use the explicit keyword for the SCEV class' constructor.
...
llvm-svn: 36686
2007-05-03 18:45:06 +00:00
Chris Lattner
49b1ec44eb
This is a patch to fix a compile error in STLExtras.h, and
...
a bug in GraphWriter.cpp.
Patch by Florian Brandner
llvm-svn: 36684
2007-05-03 18:32:10 +00:00
Chris Lattner
8b4f0920ab
remove extraneous type qualifiers
...
llvm-svn: 36679
2007-05-03 18:14:56 +00:00
Chris Lattner
fb7a009708
remove extraneous top-level semi's
...
llvm-svn: 36678
2007-05-03 18:13:15 +00:00
Chris Lattner
060e3be47e
remove two useless functions. Just inherit Type's implementation instead.
...
llvm-svn: 36677
2007-05-03 17:10:20 +00:00
Chris Lattner
d710ec51bf
remove useless type qualifiers
...
llvm-svn: 36676
2007-05-03 17:09:36 +00:00
Chris Lattner
5f70561cc5
avoid invalid C++ token in #error
...
llvm-svn: 36674
2007-05-03 16:57:26 +00:00
Devang Patel
cd45427a87
Drop 'const'
...
llvm-svn: 36662
2007-05-03 01:11:54 +00:00
Chris Lattner
a3d01187b7
Add a new option.
...
llvm-svn: 36657
2007-05-03 00:16:07 +00:00
Devang Patel
8ee9065162
Use 'static const char' instead of 'static const int'.
...
Due to darwin gcc bug, one version of darwin linker coalesces
static const int, which defauts PassID based pass identification.
llvm-svn: 36652
2007-05-02 21:39:20 +00:00
Devang Patel
32786f1037
Re-install patch to enable use of PassID.
...
I am preparing another patch to address the failure that prompted
Chris to revert this patch earlier.
llvm-svn: 36649
2007-05-02 20:38:25 +00:00
Chris Lattner
79333821da
update to reflect reality
...
llvm-svn: 36643
2007-05-02 05:47:22 +00:00
Chris Lattner
055c13234b
revert enough of devang's recent patches to get the tree basically working again
...
llvm-svn: 36638
2007-05-02 04:25:31 +00:00
Anton Korobeynikov
6e6bfcaf4d
Fix couple of bugs connected with eh info:
...
1. Correct output offsets on Linux
2. Fix "style" of personality function. It shouldn't be indirect.
llvm-svn: 36633
2007-05-01 22:23:12 +00:00
Devang Patel
38a66bc82e
Do not use typeinfo to identify pass in pass manager.
...
llvm-svn: 36632
2007-05-01 21:15:47 +00:00
Evan Cheng
e7bd8c76db
Pass call frame setup SP adjustment along to eliminateFrameIndex().
...
llvm-svn: 36624
2007-05-01 08:59:18 +00:00
Evan Cheng
65f0ba62d5
Add SPAdj parameter to account for call frame setup SP adjustment.
...
llvm-svn: 36623
2007-05-01 08:58:27 +00:00
Nate Begeman
767ee95d29
llvm bug #1350 , parts 1, 2, and 3.
...
llvm-svn: 36618
2007-05-01 05:57:02 +00:00
Chris Lattner
21e0d64a6e
several bitfixes to JumpToBit
...
llvm-svn: 36616
2007-05-01 05:51:32 +00:00
Chris Lattner
eb2a5f5f99
add JumpToBit, an explicit init method, and a default ctor.
...
llvm-svn: 36613
2007-05-01 04:59:06 +00:00
Chris Lattner
92eca49c3f
add missing opcode.
...
llvm-svn: 36608
2007-05-01 02:12:05 +00:00
Evan Cheng
34e61fc3cd
Added hook hasReservedCallFrame(). It returns true if the call frame is
...
included as part of the stack frame.
llvm-svn: 36606
2007-05-01 00:47:46 +00:00
Christopher Lamb
799da3f145
Implement review feedback.
...
llvm-svn: 36603
2007-04-30 23:54:10 +00:00
Christopher Lamb
b8a156a82e
Header file for ELF relocations.
...
llvm-svn: 36597
2007-04-30 20:41:08 +00:00
Anton Korobeynikov
14376967ac
Fix comment
...
llvm-svn: 36596
2007-04-30 19:14:56 +00:00
Reid Spencer
db43279e9a
If an archive is not recognized as an LLVM bytecode archive then declare
...
that it is native so that the linker will pass it on downstream. This avoids
a problem where the native link line fails because there is both a .so and
a .a file. The .a file gets processed as bytecode and then dropped from the
command line.
llvm-svn: 36584
2007-04-30 00:29:39 +00:00
Chris Lattner
31d1dec66d
add some helpers
...
llvm-svn: 36580
2007-04-29 21:49:05 +00:00
Chris Lattner
8a40d39a8e
compute this value correctly
...
llvm-svn: 36575
2007-04-29 19:49:58 +00:00
Dale Johannesen
1ee5f128f6
Make ARM-specific version of getInlineAsmLength
...
llvm-svn: 36572
2007-04-29 19:17:45 +00:00
Chris Lattner
d61ccde429
add a method
...
llvm-svn: 36571
2007-04-29 19:17:32 +00:00
Anton Korobeynikov
3d95e52ea2
Implement protected visibility. This partly implements PR1363. Linker
...
should be taught to deal with protected symbols.
llvm-svn: 36565
2007-04-29 18:35:00 +00:00
Anton Korobeynikov
cb2004f82c
Implement review feedback
...
llvm-svn: 36564
2007-04-29 18:02:48 +00:00
Chris Lattner
631dd78a41
Jeff's fix was fine
...
llvm-svn: 36563
2007-04-29 17:44:10 +00:00
Chris Lattner
2e9010f6e6
add missing ctor
...
llvm-svn: 36562
2007-04-29 17:40:50 +00:00
Jeff Cohen
7cfc4b404f
Fix MemoryBuffer breakage correctly.
...
llvm-svn: 36561
2007-04-29 14:43:31 +00:00
Chris Lattner
8308e85781
make this file self-contained
...
llvm-svn: 36555
2007-04-29 08:05:07 +00:00
Chris Lattner
eee1022086
Switch the bitcode reader interface to take a MemoryBuffer instead of knowing
...
anything about disk I/O itself. This greatly simplifies its interface -
eliminating the need for the ReaderWrappers.cpp file.
This adds a new option to llvm-dis (-bitcode) which instructs it to read
the input file as bitcode. Until/unless the bytecode reader is taught to
read from MemoryBuffer, there is no way to handle stdin reading without it.
I don't plan to switch the bytecode reader over, I'd rather delete it :),
so the option will stay around temporarily.
llvm-svn: 36554
2007-04-29 07:54:31 +00:00
Chris Lattner
4749cca517
Add a new memorybuffer class, to unify all the file reading code in the system
...
llvm-svn: 36553
2007-04-29 06:58:52 +00:00
Chris Lattner
ad7a365974
new method for creating a path, which does not create a temporary string.
...
llvm-svn: 36552
2007-04-29 06:16:32 +00:00
Anton Korobeynikov
45162c6dad
Implement review feedback. Aliasees can be either GlobalValue's or
...
bitcasts of them.
llvm-svn: 36537
2007-04-28 13:45:00 +00:00
Chris Lattner
5bc24967c1
add a default parameter
...
llvm-svn: 36529
2007-04-28 05:42:38 +00:00
Chris Lattner
ab3ae8dd2f
add a way to make this less brittle
...
llvm-svn: 36528
2007-04-28 05:38:52 +00:00
Chris Lattner
0b40f6db6c
represent indirect operands explicitly in inline asm strings.
...
llvm-svn: 36522
2007-04-28 01:02:58 +00:00
Chris Lattner
9bfe8f4517
add a GEP helper function
...
llvm-svn: 36515
2007-04-27 20:35:56 +00:00
Jeff Cohen
adae970e06
Fix prolific source of 'possible loss of data' warnings.
...
llvm-svn: 36507
2007-04-27 14:43:05 +00:00
Devang Patel
e7e2cb2826
Move ~Pass() from Pass.h into Pass.cpp
...
llvm-svn: 36498
2007-04-26 21:33:42 +00:00
Devang Patel
2becf3a0a4
Delete Analysis Resolver.
...
llvm-svn: 36493
2007-04-26 21:06:41 +00:00
Dan Gohman
bda4470e76
Fix a typo in a comment.
...
llvm-svn: 36485
2007-04-26 19:40:56 +00:00
Evan Cheng
eff332e3e1
Rename findRegisterUseOperand to findRegisterUseOperandIdx to avoid confusion.
...
llvm-svn: 36483
2007-04-26 19:00:32 +00:00
Jeff Cohen
34d6dc5574
Rename identifier that GCC uses as a macro, breaking llvm-gcc build.
...
llvm-svn: 36474
2007-04-26 15:07:47 +00:00
Chris Lattner
e1248f05f2
start defining codes for instructions
...
llvm-svn: 36471
2007-04-26 05:53:04 +00:00
Chris Lattner
4721ac3ee0
add a new code
...
llvm-svn: 36462
2007-04-26 03:26:26 +00:00
Chris Lattner
4a0785ffcd
add alias support to bitcode
...
llvm-svn: 36460
2007-04-26 02:46:23 +00:00
Evan Cheng
cfa2a787f7
Be careful when to add implicit kill / dead operands. Don't add them during / post reg-allocation.
...
llvm-svn: 36458
2007-04-26 01:40:09 +00:00
Evan Cheng
132ea465a1
Change UsedPhysRegs from array bool to BitVector to save some space. Setting / getting its states now go through MachineFunction.
...
llvm-svn: 36451
2007-04-25 22:10:09 +00:00
Evan Cheng
e464e596a6
Data structure change to improve compile time (especially in debug mode).
...
llvm-svn: 36447
2007-04-25 19:34:00 +00:00
Devang Patel
6a358e5694
Mem2Reg does not need TargetData.
...
llvm-svn: 36446
2007-04-25 18:41:11 +00:00
Devang Patel
b6ef7bc5d9
Remove unused function argument.
...
llvm-svn: 36441
2007-04-25 17:15:20 +00:00
Anton Korobeynikov
d9de1e8852
Add missed file
...
llvm-svn: 36439
2007-04-25 16:42:39 +00:00