Commit Graph

22548 Commits

Author SHA1 Message Date
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
a7750c1142 Change DiffFilesWithTolerance to be written in terms of MemoryBuffer,
not an mmapped file.  This more closely matches its requirements and
provides an implicitly null terminated buffer, something this
routine had to emulate itself before.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49024 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-01 03:39:49 +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
0838923afb add missing #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49020 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-01 02:58:05 +00:00
Evan Cheng
9845eb5b03 More soft fp fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49016 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-01 02:18:22 +00:00
Evan Cheng
db45d1c649 Pasto.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49014 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-01 02:00:09 +00:00
Evan Cheng
6ad2f930da Add comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49013 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-01 01:51:26 +00:00
Evan Cheng
110cf48752 Unbreak ARM / Thumb soft FP support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49012 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-01 01:50:16 +00:00
Dale Johannesen
2ffbcaccd1 Accept 'y' constraint (MMX) in inline asm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49011 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-01 00:57:48 +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
Dale Johannesen
1544e4713b Emit exception handling info for functions which are
not marked nounwind, or for all functions when -enable-eh
is set, provided the target supports Dwarf EH.

llvm-gcc generates nounwind in the right places; other FEs
will need to do so also.  Given such a FE, -enable-eh should
no longer be needed.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49006 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-31 23:40:23 +00:00
Evan Cheng
427f4c106a It's not safe to fold a load from GV stub or constantpool into a two-address use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49002 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-31 23:19:51 +00:00
Nate Begeman
82b53cd2ba Actually disable crash reporting on Mac OS X, returning bugpoint to speedy
crash miscompilations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49000 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-31 22:19:25 +00:00
Dan Gohman
6faaef57b0 Set blockBegin to point to the beginning of the block,
not the end.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48999 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-31 22:08:00 +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
Dan Gohman
b061c4bc44 Fix a DAGCombiner optimization to respect volatile qualification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48994 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-31 20:32:52 +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
Evan Cheng
9d15abe838 Re-apply 48911.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48977 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-31 07:54:19 +00:00
Evan Cheng
24d2f8a212 The support for remat of instructions with a register operand is hackish, to say the least. Since the register operand guaranteed to be PIC base and that it is already live at all uses, we are making sure it will not be spilled after its uses are rematerialized for both performance and correctness reasons.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48976 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-31 07:53:30 +00:00
Owen Anderson
bc91bd34f1 Fix a major bug in the DFS calculation. Thanks for Christopher Lamb for pointing this out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48973 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-31 01:39:20 +00:00
Nate Begeman
83ad90a779 Don't eliminate bitcast instructions that change the type of a pointer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48971 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-31 00:22:16 +00:00
Duncan Sands
66a1a05c86 Fix comment typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48967 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-30 19:38:55 +00:00
Nick Lewycky
8dd6505868 Moved from PR1570.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48965 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-30 19:07:11 +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
Chris Lattner
f19f58a936 minor code cleanups, allow constant folding sinf/cosf.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48961 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-30 18:02:00 +00:00
Evan Cheng
fd5da6c991 Cosmetic changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48947 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-29 18:34:22 +00:00
Chris Lattner
97ae12a988 change iterator invalidation avoidance to just move the iterator backward
when something changes, instead of moving forward.  This allows us to 
simplify memset lowering, inserting the memset at the end of the range of 
stuff we're touching instead of at the start.

This, in turn, allows us to make use of the addressing instructions already
used in the function instead of inserting our own.  For example, we now
codegen:

	%tmp41 = getelementptr [8 x i8]* %ref_idx, i32 0, i32 0		; <i8*> [#uses=2]
	call void @llvm.memset.i64( i8* %tmp41, i8 -1, i64 8, i32 1 )

instead of:

	%tmp20 = getelementptr [8 x i8]* %ref_idx, i32 0, i32 7		; <i8*> [#uses=1]
	%ptroffset = getelementptr i8* %tmp20, i64 -7		; <i8*> [#uses=1]
	call void @llvm.memset.i64( i8* %ptroffset, i8 -1, i64 8, i32 1 )



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48940 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-29 05:15:47 +00:00
Chris Lattner
d22fe2b51f make the common case of a single store (which clearly shouldn't be turned
into a memset!) faster by avoiding an allocation of an std::list node.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48939 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-29 04:52:12 +00:00
Chris Lattner
9f8a6a7498 give form-memset a significantly more sane heuristic, enable it by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48937 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-29 04:36:18 +00:00
Owen Anderson
c7c00361ce Remove some unneeded code for LiveInterval joining, and fix a bug in the Phi elimination algorithm where we were accidentally reasoning about
the source rather than the destination.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48936 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-29 01:58:47 +00:00
Dan Gohman
d4a2ad35e3 Fix a tokenfactor node to use the load chain rather than the
load value. This fixes PR2177.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48932 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-28 23:45:16 +00:00
Evan Cheng
4db4f1ce7e Backing out 48911 for now. It's breaking stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48922 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-28 17:49:06 +00:00
Chris Lattner
2a88a5c92f ifdef out a dead function. Should this be removed?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48916 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-28 15:36:27 +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
Evan Cheng
ddf0a06580 New entry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48912 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-28 07:07:06 +00:00
Evan Cheng
86f57b0983 Load from stub is already re-materializable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48911 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-28 06:49:25 +00:00
Nick Lewycky
0c78ac11dd Update example to new syntax.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48910 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-28 06:46:51 +00:00
Chris Lattner
7f0965e7da make memset inference significantly more powerful: it can now handle
memsets that initialize "structs of arrays" and other store sequences
that are not sequential.  This is still only enabled if you pass 
-form-memset-from-stores.  The flag is not heavily tested and I haven't
analyzed the perf regressions when -form-memset-from-stores is passed
either, but this causes no make check regressions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48909 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-28 06:45:13 +00:00
Evan Cheng
02bee85a70 New entry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48908 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-28 06:34:23 +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
Devang Patel
4a3c0ac798 PHI->removeIncomingValue may remove PHInode.
Increment iterator in advance.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48890 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-27 17:32:46 +00:00
Roman Levenstein
d7d3ea00c0 Fix spelling. Thanks, Duncan! :-)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48873 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-27 09:44:37 +00:00
Roman Levenstein
95d4184e72 Speed-up the SumOfUnscheduledPredsOfSuccs by introducing a new function
called LimitedSumOfUnscheduledPredsOfSuccs. It terminates the computation
after a given treshold is reached. This new function is always faster, but
brings real wins only on bigger test-cases.

The old function SumOfUnscheduledPredsOfSuccs is left in-place for now and therefore a warning about an unused static function is produced.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48872 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-27 09:14:57 +00:00
Evan Cheng
e3d8dbf479 Code clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48856 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-27 01:45:11 +00:00
Evan Cheng
e771ebd7a3 Allow certain lea instructions to be rematerialized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48855 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-27 01:41:09 +00:00
Evan Cheng
d1e4b3515c Remove an unused command line option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48854 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-27 01:30:24 +00:00
Evan Cheng
7a963fa8ee Fix a memory bug: increment an iterator of a deleted machine instr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48853 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-27 01:27:25 +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