Commit Graph

1153 Commits

Author SHA1 Message Date
Alkis Evlogimenos
1cecd3a1d2 Add new function getPtrPtrFromArrayPtr().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20684 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-19 11:40:31 +00:00
Misha Brukman
fd67824386 Convert tabs to spaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20638 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-16 05:42:00 +00:00
Chris Lattner
39220ded94 stop using arg_front
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20599 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 05:03:36 +00:00
Chris Lattner
e4d5c441e0 This mega patch converts us from using Function::a{iterator|begin|end} to
using Function::arg_{iterator|begin|end}.  Likewise Module::g* -> Module::global_*.

This patch is contributed by Gabor Greif, thanks!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20597 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 04:54:21 +00:00
Chris Lattner
76da61621c correct the computation of the isAbstract bit for types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20533 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-09 17:34:27 +00:00
Reid Spencer
9dbf1e5bb8 Fix a typo in an assertion comment.
Patch contributed by Vladimir Merzliakov.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20529 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-09 15:19:41 +00:00
Chris Lattner
f1b4d1dee6 rename insertEntry to insert
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20484 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 05:55:40 +00:00
Chris Lattner
e4c872a8fa Merge SymbolTable::removeEntry into SymbolTable::remove, its only caller
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20483 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 05:51:09 +00:00
Chris Lattner
c27aa8ddb2 Delete the really inefficient method: void remove(const Type* Typ);
Speed up the symbol stripping code by avoiding a linear search of the
type table.

Get rid of removeEntry(type_iterator), since 'remove' is exactly the same
operation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20481 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 05:46:41 +00:00
Chris Lattner
a98cbe57ea Remove some really gross and hard to understand code now that
InternallyInconsistent is always false.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20477 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 05:21:40 +00:00
Chris Lattner
ee4da939b0 Simplify some code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20476 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 05:13:42 +00:00
Chris Lattner
921c565888 remove these methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20474 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 02:37:47 +00:00
Chris Lattner
04cb800c32 This fixes PR531, a crash when running the CBE on a bytecode file.
The problem is that Function::renameLocalSymbols is iterating through
the symbol table planes, occasionally calling setName to rename a value
(which used to do a symbol table remove/insert pair).

The problem is that if there is only a single value in a particular type
plane that the remove will nuke the symbol table plane, and the insert
will create and insert a new one.  This hoses Function::renameLocalSymbols
because it has an iterator to the old plane, under the (very reasonable)
assumption that simply renaming a value won't cause the type plane to
disappear.

This patch fixes the bug by making the rename operation a single atomic
operation, which has a side effect of making the whole thing faster too. :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20469 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 02:14:28 +00:00
Chris Lattner
0d1e40728d remove all of the various setName implementations, consolidating them into
Value::setName, which is no longer virtual.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20464 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-05 19:51:50 +00:00
Chris Lattner
8e1b8473eb 2nd arg to setName goes away.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20460 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-05 19:02:15 +00:00
Chris Lattner
ffdb920ec2 Constants never get names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20459 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-05 19:01:59 +00:00
Chris Lattner
18221ed507 Remove the 2nd argument to Value::setName
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20458 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-05 19:01:49 +00:00
Misha Brukman
0fbd914362 Fix the spelling of the word `the'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20412 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-02 23:17:31 +00:00
Chris Lattner
31ab1b3d74 Print the module ID as a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20411 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-02 23:12:40 +00:00
Chris Lattner
ded3613fef Fix a nasty order of evaluation bug that Gabor Greif ran into. Here's an
explanation from IRC:

	|sabre|	I think it's an order of evaluation thing
	|sabre|	for me, the RHS of the assignment is evaluated first
	|sabre|	getTypeDescription checks to see if ConcreteTypeDescription[Ty] contains anything
	|sabre|	since it doesn't, it computes and returns the value
	|sabre|	this gets put into the map.
	|sabre|	For you, the LHS is evaluated first.
	|sabre|	Map[Ty] (aka ConcreteTypeDescriptions[Ty]) inserts an empty string into the map, returning a reference
	|sabre|	getTypeDesc then sees the empty string in the map
	|sabre|	and returns it
	|sabre|	bork :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20394 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-02 03:54:43 +00:00
Chris Lattner
edac2d1a80 recognize llvm.prefetch. Patch contributed by Justin Wick!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20377 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-28 19:28:00 +00:00
Chris Lattner
6f72282e02 Verify llvm.prefetch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20376 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-28 19:27:42 +00:00
Chris Lattner
aab1820816 Fix some problems where the verifier would crash on invalid input instead of
reporting the problem and exiting.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20302 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-24 16:58:29 +00:00
Chris Lattner
d1a326006d switch instructions only allow constantints for their values, be more specific.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20298 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-24 05:32:09 +00:00
Chris Lattner
ad993cbb77 add a new method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20293 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-24 02:37:26 +00:00
Chris Lattner
1f21ef1511 make this more efficient. Scan up to 16 nodes, not the whole list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20289 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-23 16:53:04 +00:00
Chris Lattner
8daf056c90 new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20288 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-23 16:51:11 +00:00
Chris Lattner
35f0aecdb0 Reduce the amount of searching this assertion does. On a testcase of mine,
this reduces the time for -simplifycfg in a debug build from 106s to 14.82s


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20286 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-23 07:09:08 +00:00
Chris Lattner
1117bb0e99 Nuke blank line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20154 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-13 17:54:21 +00:00
Chris Lattner
fe0343a1cd Fix test/Regression/Assembler/2005-02-09-AsmWriterStoreBug.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20089 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-09 17:45:03 +00:00
Chris Lattner
286629736f Instead of initializing the volatile field, use accessors to set it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20045 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-05 01:38:38 +00:00
Chris Lattner
905547b02b Initialize new field.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20044 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-05 01:37:58 +00:00
Chris Lattner
29d1ca6c42 Updates for new use list changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19961 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-01 01:24:21 +00:00
Chris Lattner
5c461404fe Update for API change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19960 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-01 01:24:01 +00:00
Chris Lattner
bca81448ac Improve conformance with the Misha spelling benchmark suite
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19930 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-30 00:09:23 +00:00
Chris Lattner
3cf8e6857e Adjust to ilist changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19923 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-29 18:41:12 +00:00
Chris Lattner
1f377fcaad Make sure that we always grow a multiple of 2 operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19902 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-29 01:05:12 +00:00
Chris Lattner
96d83f63cd Adjust to changes in User class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19892 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-29 00:35:33 +00:00
Chris Lattner
b12261ac69 Merge InstrTypes.cpp into this file
Adjust to changes in the User class, operand handling is very different.
PHI node and switch statements must handle explicit resizing of operand
lists.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19891 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-29 00:35:16 +00:00
Chris Lattner
e467147b30 Adjust to changes in User class. Aggregate constants now must explicitly
manage their operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19890 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-29 00:34:39 +00:00
Chris Lattner
265287f714 This file is now merged into Instructions.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19889 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-29 00:33:32 +00:00
Chris Lattner
f4aa3351de Fix a nasty thinko in my previous commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19881 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-28 23:17:27 +00:00
Chris Lattner
ce04a6d7f6 Fix ConstProp/2005-01-28-SetCCGEP.ll: indexing over zero sized elements does
not change the address.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19874 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-28 19:09:51 +00:00
Misha Brukman
1bae291cb9 Fix grammar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19854 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-27 06:46:38 +00:00
Jeff Cohen
5fb6ed4ae6 Use binary mode for reading/writing bytecode files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19751 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22 17:36:17 +00:00
Chris Lattner
353c3e4981 Add missing entry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19712 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-20 17:32:28 +00:00
Chris Lattner
57bf3287dd implement these methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19571 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-15 06:52:40 +00:00
Chris Lattner
9a791eaf8f Make this compatible with the HP/intel compiler. Fix by Duraid, thanks!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19548 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-14 15:53:26 +00:00
Chris Lattner
7d7a0ed4ec Allow arrays to have more than 4G elements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19395 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 20:19:51 +00:00
Chris Lattner
fe59d36c45 Add convenience method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19321 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 07:40:32 +00:00