Commit Graph

6614 Commits

Author SHA1 Message Date
Evan Cheng
c5ea2010c0 Forgot this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49247 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-05 02:17:58 +00:00
Duncan Sands
b51a0d87ac If a value is cast to its own type, then the cast
is not needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49210 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-04 08:28:13 +00:00
Chris Lattner
f4cc3096fd Make ExecutionEngine::updateGlobalMapping return the old mapping.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49206 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-04 04:47:41 +00:00
Ted Kremenek
a150ffeada Add member template version of SerializeTrait<T>::Create that also accepts
an optional argument for us by T's Create method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49169 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 16:44:37 +00:00
Evan Cheng
f30a49d9e0 Special handling of zero-sized live intervals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49167 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 16:40:27 +00:00
Evan Cheng
419852ca8a - Treat a live range defined by an implicit_def as a zero-sized one.
- Eliminate an implicit_def when it's being spilled.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49166 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 16:39:43 +00:00
Evan Cheng
8a50f1fcf0 Start of a series of patches related to implicit_def.
There is no point in creating a long live range defined by an implicit_def. Scheduler now duplicates implicit_def instruction for each of its uses. Therefore, if an implicit_def node has multiple uses, it will become a number of very short live ranges, rather than a long one. This will make coalescer's job easier.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49164 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 16:36:07 +00:00
Evan Cheng
6397c64441 Backing out 48222 temporarily.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49124 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 03:13:16 +00:00
David Greene
a022e3fc2f Iterators folloring a SmallVector erased element are invalidated so
don't access cached iterators from after the erased element.

Re-apply 49056 with SmallVector support.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49106 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 18:24:46 +00:00
Evan Cheng
ea1d9cdc4e Now that I am told MachineRegisterInfo also tracks physical register uses / defs, I can do away with the horribleness I introduced a while back. It's impossible to detect if there is any use of a physical register below an instruction (and before any def of the register) with some cheap book keeping.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49105 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 18:04:08 +00:00
Evan Cheng
1088317675 Remove #include<map> from LiveVariables.h. Not referenced.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49099 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 17:23:50 +00:00
Torok Edwin
56c2f99f00 Add new file Support/DataFlow.h.
It allows Use-Def and Def-Use relations to be treated as graphs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49088 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 14:57:52 +00:00
Anton Korobeynikov
67073f1cbd Add new CC lowering rule: provide a list of registers, which can be 'shadowed',
when some another register is used for argument passing.
Currently is used on Win64.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49079 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 05:23:57 +00:00
Dale Johannesen
1532f3ddd7 Recommitting EH patch; this should answer most of the
review feedback.
-enable-eh is still accepted but doesn't do anything.
EH intrinsics use Dwarf EH if the target supports that,
and are handled by LowerInvoke otherwise.
The separation of the EH table and frame move data is,
I think, logically figured out, but either one still
causes full EH info to be generated (not sure how to
split the metadata correctly).
MachineModuleInfo::needsFrameInfo is no longer used and
is removed.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49064 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 00:25:04 +00:00
Chris Lattner
038112a4e0 Change the MemoryBuffer::getFile* methods to take just a pointer to the
start of a filename, not a filename+length.  All clients can produce a
null terminated name, and the system api's require null terminated 
strings anyway.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49041 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-01 18:04:03 +00:00
Chris Lattner
98b7e612b2 MappedFile is dead, remove it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49035 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-01 06:20:44 +00:00
Chris Lattner
799ed1053b Stub out some sys::Path::MapInFilePages/UnMapFilePages methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49030 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-01 06:00:12 +00:00
Chris Lattner
7f6b447904 change the archive stuff to use MemoryBuffer instead of mappedfile.
MemoryBuffer is higher level and more closely matches the model
needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49029 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-01 04:26:46 +00:00
Chris Lattner
685412e92f prune unneeded #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49028 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-01 04:00:45 +00:00
Chris Lattner
2fcebc5e63 rewrite SourceFile to be in terms of MemoryBuffer, not MappedFile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49027 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-01 03:59:34 +00:00
Chris Lattner
23ffec8258 Make MappedFile::map return a const correct pointer, don't leak address space on Unix platforms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49026 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-01 03:49:38 +00:00
Chris Lattner
37db5d67f9 Remove the MappedFile::charBase member, rename base -> getBase() and
make getBase() return a const-correct pointer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49025 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-01 03:40:53 +00:00
Chris Lattner
cc56e64a59 add an accessor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49023 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-01 03:20:31 +00:00
Chris Lattner
bdbd2d710c Remove MappedFile support for mapping files for write and exec
and shared.  This complicates the design, is not used, and probably
doesn't even work.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49022 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-01 03:10:22 +00:00
Chris Lattner
558755ce1a remove extraneous #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49021 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-01 03:01:15 +00:00
Chris Lattner
1213d67265 update comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49010 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-01 00:54:39 +00:00
Chris Lattner
540630f637 cleanup the MappedFile API and comments. This removes and updates
tons of out of date comments (really nothing throws here!) and fixes
some other fairly glaring issues: "size" used to return the size of 
the file *and* change it, depending on how you called it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49009 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-01 00:53:25 +00:00
Chris Lattner
328c84aa99 remove DEFINING_FILE_FOR for MappedFile.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49008 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-01 00:35:55 +00:00
Evan Cheng
ca1267c02b Move reMaterialize() from TargetRegisterInfo to TargetInstrInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48995 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-31 20:40:39 +00:00
Torok Edwin
f4290266e9 test commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48984 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-31 17:09:58 +00:00
Erick Tryzelaar
d6d018589c Expose Function::viewCFG and Function::viewCFGOnly to bindings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48982 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-31 16:22:09 +00:00
Chris Lattner
d27c991ceb Fix "Control reaches the end of non-void function" warnings,
patch by David Chisnall.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48963 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-30 18:22:13 +00:00
Evan Cheng
9180c8e3cf Cosmetic change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48935 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-29 01:04:05 +00:00
Duncan Sands
e10efce225 Rename getAnyLoad to getLoad is suggested by Evan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48914 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-28 09:45:24 +00:00
Duncan Sands
14ea39cf3c Implement LegalizeTypes support for softfloat LOAD.
In order to handle indexed nodes I had to introduce
a new constructor, and since I was there I factorized
the code in the various load constructors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48894 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-27 20:23:40 +00:00
Dan Gohman
86e1ebf9bb Avoid creating chain dependencies from CopyToReg nodes to load and store
nodes. This doesn't currently have much impact the generated code, but it
does produce simpler-looking SelectionDAGs, and consequently
simpler-looking ScheduleDAGs, because there are fewer spurious
dependencies.

In particular, CopyValueToVirtualRegister now uses the entry node as the
input chain dependency for new CopyToReg nodes instead of calling getRoot
and depending on the most recent memory reference.

Also, rename UnorderedChains to PendingExports and pull it up from being
a local variable in SelectionDAGISel::BuildSelectionDAG to being a
member variable of SelectionDAGISel, so that it doesn't have to be
passed around to all the places that need it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48893 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-27 19:56:19 +00:00
Chris Lattner
2896652be2 when a node is removed from an ilist, set its next/prev pointers to
null.  This means that uses of invalidated iterators will explode violently
with:
ilist:143: failed assertion `NodePtr && "++'d off the end of an ilist!"'

instead of happening to work "most of the time".



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48859 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-27 02:43:03 +00:00
Erick Tryzelaar
7c1483bc6f Expose ExecutionEngine::getTargetData() to c and ocaml bindings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48851 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-27 00:27:14 +00:00
Dale Johannesen
d9ffd4cb92 Fix a bug in Darwin EH: FDE->CIE pointer must
be relocatable.  Describe why .set is needed better.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48848 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-26 23:31:39 +00:00
Roman Levenstein
e326332acd Use a linked data structure for the uses lists of an SDNode, just like
LLVM Value/Use does and MachineRegisterInfo/MachineOperand does.
This allows constant time for all uses list maintenance operations.

The idea was suggested by Chris. Reviewed by Evan and Dan.
Patch is tested and approved by Dan.

On normal use-cases compilation speed is not affected. On very big basic
blocks there are compilation speedups in the range of 15-20% or even better. 



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48822 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-26 12:39:26 +00:00
Dan Gohman
950a4c40b8 Add explicit keywords.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48801 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-25 22:06:05 +00:00
Dan Gohman
cfbb2f074d A quick nm audit turned up several fixed tables and objects that were
marked read-write. Use const so that they can be allocated in a
read-only segment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48800 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-25 21:45:14 +00:00
Devang Patel
55c666a867 Add optimize-for-size knob.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48793 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-25 21:02:35 +00:00
Bill Wendling
3ee3267fc2 De-constify the input to the "operator >>" method as it is modified.
Patch by dekruijf@cs.wisc.edu!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48782 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-25 18:16:52 +00:00
Sam Bishop
e62683d3fc Make a note of the fact that EmitOwnedPtr() has nothing to do with the
OwningPtr<> class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48763 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-25 04:41:18 +00:00
Owen Anderson
19cfd733e2 Revert r48676. I had plans for using it, but now it's just dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48743 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-24 21:29:58 +00:00
Dan Gohman
40ca2304a4 Remove an unnecessary #include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48729 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-24 16:58:44 +00:00
Dan Gohman
52837078c7 Shrink the size of AllocationInst by using its SubclassData
field to store the alignment value instead of haing a
separate field.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48727 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-24 16:55:58 +00:00
Evan Cheng
8d84d5b62c Increasing the inline limit from (overly conservative) 200 to 300. Given each BB costs 20 and each instruction costs 5, 200 means a 4 BB function + 24 instructions (actually less because caller's size also contributes to it).
Furthermore, double the limit when more than 10% of the callee instructions are vector instructions. Multimedia kernels tend to love inlining.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48725 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-24 06:37:48 +00:00
Gordon Henriksen
4733be3893 Objective Caml bindings for basic block, function, global, and arg iterators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48711 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-23 22:21:29 +00:00