1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 05:23:45 +02:00
Commit Graph

246 Commits

Author SHA1 Message Date
Chris Lattner
eb973c8226 Parse undef and unreachable
llvm-svn: 17053
2004-10-16 18:17:13 +00:00
Reid Spencer
e6418ec30f Update to reflect changes in Makefile rules.
llvm-svn: 16950
2004-10-13 11:46:52 +00:00
Reid Spencer
7d9cba7a0f Initial version of automake Makefile.am file.
llvm-svn: 16885
2004-10-10 20:43:57 +00:00
Chris Lattner
e2607964ae Add a check to avoid an assertion on malformed input
llvm-svn: 16861
2004-10-09 02:18:58 +00:00
Reid Spencer
7bd9d86b65 Okay, the list of link-time passes wasn't such a hot idea. Its prone to
error. We'll strategize on this when we have multiple front ends to deal
with. For now llvm-ld just runs a standard set of transforms.

llvm-svn: 16333
2004-09-14 05:43:23 +00:00
Reid Spencer
4a1593ebd2 Add support for the link-time pass list to Modules.
llvm-svn: 16321
2004-09-13 23:44:23 +00:00
Reid Spencer
c4abcbefb1 Changes For Bug 352
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.

llvm-svn: 16137
2004-09-01 22:55:40 +00:00
Reid Spencer
fdbcdb732f Examine the type code in the setcc class of instructions and if it
is a PackedType, throw an error. Temporary solution.

Patch contributed by Brad Jones.

llvm-svn: 15963
2004-08-21 16:11:02 +00:00
Chris Lattner
fb6d2225ff quish a warning
llvm-svn: 15954
2004-08-20 18:07:39 +00:00
Brian Gaeke
01636f4e0f Packed types, brought to you by Brad Jones
llvm-svn: 15938
2004-08-20 06:00:58 +00:00
Chris Lattner
54c0c44d38 Work around PR424 for old c/c++ frontends.
llvm-svn: 15882
2004-08-17 17:26:41 +00:00
Alkis Evlogimenos
fb27f702ca Merge i*.h headers into Instructions.h as part of bug403.
llvm-svn: 15325
2004-07-29 12:17:34 +00:00
Chris Lattner
4fcb3b1e7d Fix bug in previous patch :(
llvm-svn: 15226
2004-07-26 01:40:20 +00:00
Chris Lattner
1bb4db76b2 Fix an extremely serious regression that was causing LLVM basic blocks to be
scrambled around almost at random, having really bad effects on icache locality.

llvm-svn: 15225
2004-07-26 01:22:59 +00:00
Reid Spencer
04819ff173 Adjust to new Module.h interface for dependent libraries
Remove mem leaks resulting from not freeing parse strings.

llvm-svn: 15217
2004-07-25 21:30:51 +00:00
Reid Spencer
4b76a409e5 bug 263:
Provide parsing for the target triple and dependent libraries.

llvm-svn: 15209
2004-07-25 17:58:28 +00:00
Reid Spencer
282e14928d bug 263:
Provide new tokens for target triples and dependent libraries.

llvm-svn: 15208
2004-07-25 17:56:00 +00:00
Reid Spencer
6ed43e1320 bug 122:
- Replace ConstantPointerRef usage with GlobalValue usage
- Minimize redundant isa<GlobalValue> usage
- Correct isa<Constant> for GlobalValue subclass
- Remove tabs
- Fix coments refering to ConstantPointerRef

llvm-svn: 14937
2004-07-18 00:08:11 +00:00
Chris Lattner
f849543948 Fix the regressions handling unnamed global variables
llvm-svn: 14870
2004-07-16 01:18:09 +00:00
Chris Lattner
7397a61a7f This is logically part of the last patch. Just more really horrible code
that is made unnecessary by it.

llvm-svn: 14831
2004-07-14 23:07:13 +00:00
Chris Lattner
d81b8323ee ** Finally DeclareNewGlobalValue is dead!
* Simplify a lot of code because type's cannot be in function symbol tables
* Fix memory leaks in handling of redefined function prototypes
* Don't use SymbolTable directly for stuff that we can go through the Module
  for.
* Fix some minor bugs on obscure testcases like:
      test/Feature/globalredefinition.ll
* Do not create GlobalVariable objects for forward referenced Functions!
* When forward referencing a function in a constant expression, do not create
  a placeholder, add a bunch of references to it, then turn around and
  replaceAllUsesOfWith on it with a new global, deleting the placeholder.
  Instead, when we find the real definition of the global, just use the
  placeholder instead of creating a new object.

This substantially simplifies the asmwriter and should even speed it up on
cases heavy in constantexprs (like C++, Java, MSIL)...

llvm-svn: 14830
2004-07-14 23:03:46 +00:00
Chris Lattner
7bef7be4c4 * Fairly substantial change. Instead of creating new globalvariables, then
replaceAllUsesWith'ing any forward references, just use the forward
  reference if it exists.

This introduces GetForwardRefForGlobal, which will eventually completely
replace the horrible DeclareNewGlobalValue function.

llvm-svn: 14828
2004-07-14 21:44:00 +00:00
Chris Lattner
5b80b7157a Fold setValueNameMergingDuplicates into ParseGlobalVariable, allowing us
to substantially simplify the result.  In particular, we no longer create
GlobalVariables and then immediately destroy them when they are duplciate
definitions.

The real point of this patch though is that it gets us closer to the
DeclareNewGlobalValue calls...

llvm-svn: 14827
2004-07-14 20:42:57 +00:00
Chris Lattner
7044b0d4e1 Fix a regression from last night. Apparently the CFE is broken and outputs
functions multiple times, expecting them to be merged.  This should be fixed
in the CFE, then here.

llvm-svn: 14823
2004-07-14 19:33:47 +00:00
Chris Lattner
6472a6b770 Pull out code shared between GV forward-decl and definition processing.
This gives us only a single call site for setValueNameMergingDuplicates.
The next stage is the start merging them together.

llvm-svn: 14811
2004-07-14 08:23:52 +00:00
Chris Lattner
9827ad9f08 Simplify code. Do not allow functions to be redefined more than once.
Since the stupid '%X = const int 4' thing is gone, we can now simplify
setValueNameMergingDuplicates a bit more.

llvm-svn: 14810
2004-07-14 07:12:48 +00:00
Chris Lattner
fafef8ecd1 Remove a gross and crufty "feature" that was never documented and doesn't work.
llvm-svn: 14809
2004-07-14 06:44:56 +00:00
Chris Lattner
633e78c5c6 Finegrainify namespacification
llvm-svn: 14808
2004-07-14 06:39:48 +00:00
Chris Lattner
a262a55378 Revamp handling of labels. In particular, if we create a forward reference
for a basic block, use it when the block is defined instead of deleting it
and creating a new one.  Also, only create at most ONE forward reference
for any block, instead of one for each forward reference.

llvm-svn: 14807
2004-07-14 06:28:35 +00:00
Chris Lattner
483a35c547 Split the basic block handling case out of getVal into getBBVal.
llvm-svn: 14805
2004-07-14 01:33:11 +00:00
Chris Lattner
96d249c97a Fine-grainify namespacification, prune #include
llvm-svn: 14792
2004-07-13 08:42:12 +00:00
Chris Lattner
ed8ebfdac9 Fix typeo and refactor bb productions to make it possible for us to reuse any
forward reference blocks if they have been created (instead of creating a new
block, replaceAllUsesOfWith, then nuking the placeholder).   This is not yet
implemented.

llvm-svn: 14791
2004-07-13 08:39:15 +00:00
Chris Lattner
3ab20a8c6a Eliminate some mega-cruft here. There is no reason to DERIVE FROM IR CLASSES
just to keep track of some per-object state!  Gaah!  Whoever wrote this stuff...
oh wait, that would be me.  Never mind.

llvm-svn: 14790
2004-07-13 08:28:21 +00:00
Chris Lattner
2314ffe629 Inline the now trivial setValueNameInternal function into both callers
llvm-svn: 14789
2004-07-13 08:12:39 +00:00
Chris Lattner
34682ff049 Now that basic blocks are eagerly inserted into the Function, we can use
the funciton symbol table to check for conflicts instead of having to
keep a shadow named LocalSymtab.  Totally eliminate LocalSymtab.  Verified
that this did not cause a regression on the testcase for PR107.

llvm-svn: 14788
2004-07-13 08:10:10 +00:00
Chris Lattner
83973de5a7 A couple of substantial cleanup fixes:
1. Split setValueName into two separate functions, one that is only used
     at function scope and doesn't have to deal with duplicates, and one
     that can be used either at global or function scope but that does deal
     with conflicts.  Conflicts were only in there because of the crappy old
     CFE and probably should be entirely eliminated.
  2. Insert BasicBlock's into the parent functions when they are created
     instead of when they are complete.  This effects name lookup (for the
     better), which will be exploited in the next patch.

llvm-svn: 14787
2004-07-13 07:59:27 +00:00
Chris Lattner
7aa45e259a Replace a bunch of complex ConstantPointerRef referring code with simple
code.

llvm-svn: 14785
2004-07-13 06:58:07 +00:00
Chris Lattner
75bbce2fdb Don't call Type::setName()
llvm-svn: 14724
2004-07-09 16:43:55 +00:00
Chris Lattner
2d48ef104b Eliminate uses of the UniqueID field on Type objects
llvm-svn: 14707
2004-07-08 22:30:50 +00:00
Reid Spencer
d5ed7fb8fb - remove use of isa<Type>(Val) since there's no inheritance relationship
any more. Needed for bug 122
- #include <iostream> since Value.h doesn't include it any more.

llvm-svn: 14621
2004-07-04 12:19:05 +00:00
Reid Spencer
172bb5ee88 Remove use of Type::TypeTy which is no longer defined. This change needed
for bug 122 since the "Type Type" concept is gone now.

llvm-svn: 14620
2004-07-04 12:17:44 +00:00
Chris Lattner
0cd29ae2cd Rename Type::PrimitiveID to TypeId and ::getPrimitiveID() to ::getTypeID()
llvm-svn: 14201
2004-06-17 18:19:28 +00:00
Reid Spencer
686af1f8bc Remove some more dead code resulting from adding setTypeName().
llvm-svn: 13862
2004-05-28 00:21:06 +00:00
Reid Spencer
3077b8e168 Remove an assertion that uses Type::TypeTy that is never hit and will
break when Type::TypeTy goes away. Also remove a dead block of code and
dead comments.

llvm-svn: 13861
2004-05-27 22:05:50 +00:00
Chris Lattner
a7e4eba812 Add support for dos-style files
llvm-svn: 13837
2004-05-27 17:49:14 +00:00
Reid Spencer
9a0451787d Provide the correct patch for bug 345. The solution is to add a setTypeName
function to llvmAsmParser.y and then use it in the one place in the grammar
that needs it. Also had to make Type::setName public because setTypeName
needs it in order to retain compatibility with setValueName.

llvm-svn: 13795
2004-05-26 21:48:31 +00:00
Chris Lattner
70d84370e1 A quick and ugly hack to fix PR345. I used TypeTy specifically to make
Reid cringe :)

llvm-svn: 13788
2004-05-26 17:08:25 +00:00
Reid Spencer
1190d6061c Changed to use SymbolTable's new lookup interface.
llvm-svn: 13758
2004-05-25 17:29:21 +00:00
Chris Lattner
22ca3df5b1 Fix a memory leak. We leaked the vector holding the entries in switch tables.
llvm-svn: 13023
2004-04-17 23:49:15 +00:00
Chris Lattner
f78d930837 Support getelementptr instructions which use uint's to index into structure
types and can have arbitrary 32- and 64-bit integer types indexing into
sequential types.

Auto-upgrade .ll files that use ubytes to index into structures to use uint's.

llvm-svn: 12652
2004-04-05 01:30:04 +00:00