Commit Graph

38191 Commits

Author SHA1 Message Date
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
Bill Wendling
1a76f00dde Simplify the conversion from "0x" numbers to a single digit number.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48907 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-28 06:22: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
Devang Patel
156b2df00d add another testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48881 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-27 17:13:55 +00:00
Mikhail Glushenkov
3ee8402645 Fix build breakage on Windows with GCC 4.3. References bug #2176.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48874 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-27 09:53:47 +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
Erick Tryzelaar
9ba8a5736a Adding the first two chapters of the ocaml/kaleidoscope tutorial.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48871 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-27 08:18:07 +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
Devang Patel
53b87db8d3 New test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48858 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-27 01:51:31 +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
Chuck Rose III
5b0c85588a Updating win32 VStudio project files with new file references and removing dead references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48849 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-27 00:02:53 +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
Mikhail Glushenkov
4d9c9e9d31 Another test commit (with git-svn)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48843 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-26 21:37:43 +00:00
Mikhail Glushenkov
56ba12c497 Test commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48840 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-26 21:18:58 +00:00
Evan Cheng
0c28432852 One more coalescer fix wrt deadness propagation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48837 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-26 20:15:49 +00:00
Evan Cheng
ed70cbb3f3 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48833 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-26 19:03:01 +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
Roman Levenstein
8dba9afd08 Fixed some spelling errors. Thanks, Duncan!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48819 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-26 11:23:38 +00:00
Roman Levenstein
e513ba4958 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48817 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-26 09:18:09 +00:00
Evan Cheng
7aae876db1 Fix some SSE4.1 instruction encoding bugs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48815 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-26 08:11:49 +00:00
Owen Anderson
d382f8a32d Dead PHI instructions need to be handled specially.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48811 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-26 03:03:23 +00:00
Erick Tryzelaar
8a64d5ed37 Test commit (removed trailing whitespace)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48809 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-26 00:38:56 +00:00
Dale Johannesen
27c31054ec 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48808 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-25 23:29:30 +00:00
Evan Cheng
e22e62b5c0 Smaller function alignment when optimizing for size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48805 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-25 22:29:46 +00:00
Evan Cheng
2659343f04 Rename option -optimizefor-size to -optimize-size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48804 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-25 22:28:39 +00:00
Owen Anderson
e4ded8937a Remove some debugging code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48803 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-25 22:26:43 +00:00
Owen Anderson
403dad6660 StrongPHIElimination doesn't support swapping live intervals like the coalescer does.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48802 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-25 22:25:27 +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
Dan Gohman
62c7b8c371 Avoid outputing spaces at the ends of lines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48797 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-25 21:38:12 +00:00
Devang Patel
73ee9c3fb1 Do not align loops if optimizing for size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48794 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-25 21:03:02 +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
Evan Cheng
26471c48b3 Handle a special case xor undef, undef -> 0. Technically this should be transformed to undef. But this is such a common idiom (misuse) we are going to handle it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48792 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-25 20:08:07 +00:00
Evan Cheng
d34af7875b Handle a special case xor undef, undef -> 0. Technically this should be transformed to undef. But this is such a common idiom (misuse) we are going to handle it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48791 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-25 20:07:13 +00:00
Anton Korobeynikov
1cf962b874 Fix the Cygwin/Mingw-On-Cygwin build. Patch by Alain Frisch!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48786 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-25 18:53:36 +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
Dan Gohman
cffbd2562a Fix typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48779 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-25 17:10:29 +00:00