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

22451 Commits

Author SHA1 Message Date
Chris Lattner
a0b425c6bc remove DEFINING_FILE_FOR for MappedFile.h
llvm-svn: 49008
2008-04-01 00:35:55 +00:00
Dale Johannesen
fa4433be71 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.

llvm-svn: 49006
2008-03-31 23:40:23 +00:00
Evan Cheng
a3ce7b4c76 It's not safe to fold a load from GV stub or constantpool into a two-address use.
llvm-svn: 49002
2008-03-31 23:19:51 +00:00
Nate Begeman
68c767cb5c Actually disable crash reporting on Mac OS X, returning bugpoint to speedy
crash miscompilations.

llvm-svn: 49000
2008-03-31 22:19:25 +00:00
Dan Gohman
f7dfe555d7 Set blockBegin to point to the beginning of the block,
not the end.

llvm-svn: 48999
2008-03-31 22:08:00 +00:00
Evan Cheng
38a755499d Move reMaterialize() from TargetRegisterInfo to TargetInstrInfo.
llvm-svn: 48995
2008-03-31 20:40:39 +00:00
Dan Gohman
f223eaafcd Fix a DAGCombiner optimization to respect volatile qualification.
llvm-svn: 48994
2008-03-31 20:32:52 +00:00
Erick Tryzelaar
847ee3e279 Expose Function::viewCFG and Function::viewCFGOnly to bindings.
llvm-svn: 48982
2008-03-31 16:22:09 +00:00
Evan Cheng
38bfff8a16 Re-apply 48911.
llvm-svn: 48977
2008-03-31 07:54:19 +00:00
Evan Cheng
39c43815d2 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.
llvm-svn: 48976
2008-03-31 07:53:30 +00:00
Owen Anderson
5d9ba35723 Fix a major bug in the DFS calculation. Thanks for Christopher Lamb for pointing this out.
llvm-svn: 48973
2008-03-31 01:39:20 +00:00
Nate Begeman
610aa2511c Don't eliminate bitcast instructions that change the type of a pointer
llvm-svn: 48971
2008-03-31 00:22:16 +00:00
Duncan Sands
39afad0613 Fix comment typo.
llvm-svn: 48967
2008-03-30 19:38:55 +00:00
Nick Lewycky
7d33dc0878 Moved from PR1570.
llvm-svn: 48965
2008-03-30 19:07:11 +00:00
Chris Lattner
49e9edd6f6 Fix "Control reaches the end of non-void function" warnings,
patch by David Chisnall.

llvm-svn: 48963
2008-03-30 18:22:13 +00:00
Chris Lattner
a69d949942 minor code cleanups, allow constant folding sinf/cosf.
llvm-svn: 48961
2008-03-30 18:02:00 +00:00
Evan Cheng
5eea2da8d5 Cosmetic changes.
llvm-svn: 48947
2008-03-29 18:34:22 +00:00
Chris Lattner
10e3ff7e5f 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 )

llvm-svn: 48940
2008-03-29 05:15:47 +00:00
Chris Lattner
48b3859ee9 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.

llvm-svn: 48939
2008-03-29 04:52:12 +00:00
Chris Lattner
722c9a539f give form-memset a significantly more sane heuristic, enable it by default.
llvm-svn: 48937
2008-03-29 04:36:18 +00:00
Owen Anderson
7d815aea28 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.

llvm-svn: 48936
2008-03-29 01:58:47 +00:00
Dan Gohman
227e702cae Fix a tokenfactor node to use the load chain rather than the
load value. This fixes PR2177.

llvm-svn: 48932
2008-03-28 23:45:16 +00:00
Evan Cheng
10d0aba260 Backing out 48911 for now. It's breaking stuff.
llvm-svn: 48922
2008-03-28 17:49:06 +00:00
Chris Lattner
90bd039074 ifdef out a dead function. Should this be removed?
llvm-svn: 48916
2008-03-28 15:36:27 +00:00
Duncan Sands
80f14df923 Rename getAnyLoad to getLoad is suggested by Evan.
llvm-svn: 48914
2008-03-28 09:45:24 +00:00
Evan Cheng
3b54c5fa08 New entry.
llvm-svn: 48912
2008-03-28 07:07:06 +00:00
Evan Cheng
d66e48366f Load from stub is already re-materializable.
llvm-svn: 48911
2008-03-28 06:49:25 +00:00
Nick Lewycky
96038a0528 Update example to new syntax.
llvm-svn: 48910
2008-03-28 06:46:51 +00:00
Chris Lattner
0a18724a00 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.

llvm-svn: 48909
2008-03-28 06:45:13 +00:00
Evan Cheng
69a8741b60 New entry.
llvm-svn: 48908
2008-03-28 06:34:23 +00:00
Duncan Sands
3d613421f1 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.

llvm-svn: 48894
2008-03-27 20:23:40 +00:00
Dan Gohman
199ab29337 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.

llvm-svn: 48893
2008-03-27 19:56:19 +00:00
Devang Patel
85770c83ba PHI->removeIncomingValue may remove PHInode.
Increment iterator in advance.

llvm-svn: 48890
2008-03-27 17:32:46 +00:00
Roman Levenstein
00030f1b38 Fix spelling. Thanks, Duncan! :-)
llvm-svn: 48873
2008-03-27 09:44:37 +00:00
Roman Levenstein
34552e20b3 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.

llvm-svn: 48872
2008-03-27 09:14:57 +00:00
Evan Cheng
e66720fd57 Code clean up.
llvm-svn: 48856
2008-03-27 01:45:11 +00:00
Evan Cheng
aca67f0b29 Allow certain lea instructions to be rematerialized.
llvm-svn: 48855
2008-03-27 01:41:09 +00:00
Evan Cheng
1afaf3092f Remove an unused command line option.
llvm-svn: 48854
2008-03-27 01:30:24 +00:00
Evan Cheng
6cbce6b602 Fix a memory bug: increment an iterator of a deleted machine instr.
llvm-svn: 48853
2008-03-27 01:27:25 +00:00
Erick Tryzelaar
0efea4df76 Expose ExecutionEngine::getTargetData() to c and ocaml bindings.
llvm-svn: 48851
2008-03-27 00:27:14 +00:00
Dale Johannesen
4524d3a1d1 Fix a bug in Darwin EH: FDE->CIE pointer must
be relocatable.  Describe why .set is needed better.

llvm-svn: 48848
2008-03-26 23:31:39 +00:00
Evan Cheng
6fc37c8f25 One more coalescer fix wrt deadness propagation.
llvm-svn: 48837
2008-03-26 20:15:49 +00:00
Evan Cheng
8d222d6221 Avoid commuting a def MI in order to coalesce a copy instruction away if any use of the same val# is a copy instruction that has already been coalesced.
llvm-svn: 48833
2008-03-26 19:03:01 +00:00
Roman Levenstein
55b8822511 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. 

llvm-svn: 48822
2008-03-26 12:39:26 +00:00
Roman Levenstein
dc2d45564d Fixed some spelling errors. Thanks, Duncan!
llvm-svn: 48819
2008-03-26 11:23:38 +00:00
Roman Levenstein
febd10df58 Some improvements related to the computation of isReachable.
This fixes Bugzilla #1835 (http://llvm.org/bugs/show_bug.cgi?id=1835).
This patched is reviewed by Tanya and Dan. Dan tested and approved it.

The reason for the bad performance of the old algorithm is that it is very naive and scans every
time all nodes of the DAG in the worst case.

This patch introduces  a new algorithm based on the paper "Online algorithms
for maintaining the topological order of a directed acyclic graph" by
David J.Pearce and Paul H.J.Kelly. This is the MNR algorithm. It has a
linear time worst-case and performs much better in most situations.

The paper can be found here:
http://fano.ics.uci.edu/cites/Document/Online-algorithms-for-maintaining-the-topological-order-of-a-directed-acyclic-graph.html

The main idea of the new algorithm is to compute the topological ordering of the SNodes in the
DAG and to maintain it even after DAG modifications. The topological ordering allows for very fast 
node reachability checks. 

Tests on very big  input files with tens of thousands of instructions in a BB indicate huge 
speed-ups (up to 10x compilation time improvement) compared to the old version.

llvm-svn: 48817
2008-03-26 09:18:09 +00:00
Evan Cheng
6323ea8467 Fix some SSE4.1 instruction encoding bugs.
llvm-svn: 48815
2008-03-26 08:11:49 +00:00
Owen Anderson
0fa6dd147f Dead PHI instructions need to be handled specially.
llvm-svn: 48811
2008-03-26 03:03:23 +00:00
Dale Johannesen
8c1e95810f Use ## for comment delimiter on darwin x86-32, so
llvm's output .s files will go through gcc -std=c99
without triggering preprocesser errors.  Approach
suggested by Daveed Vandevoorde.

llvm-svn: 48808
2008-03-25 23:29:30 +00:00
Evan Cheng
6226a78cb1 Smaller function alignment when optimizing for size.
llvm-svn: 48805
2008-03-25 22:29:46 +00:00