summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser
Commit message (Collapse)AuthorAgeFilesLines
...
* Packed types, brought to you by Brad JonesBrian Gaeke2004-08-201-2/+68
| | | | llvm-svn: 15938
* Work around PR424 for old c/c++ frontends.Chris Lattner2004-08-171-3/+29
| | | | llvm-svn: 15882
* Merge i*.h headers into Instructions.h as part of bug403.Alkis Evlogimenos2004-07-292-7/+4
| | | | llvm-svn: 15325
* Fix bug in previous patch :(Chris Lattner2004-07-261-6/+12
| | | | llvm-svn: 15226
* Fix an extremely serious regression that was causing LLVM basic blocks to beChris Lattner2004-07-261-0/+6
| | | | | | scrambled around almost at random, having really bad effects on icache locality. llvm-svn: 15225
* Adjust to new Module.h interface for dependent librariesReid Spencer2004-07-251-8/+7
| | | | | | Remove mem leaks resulting from not freeing parse strings. llvm-svn: 15217
* bug 263:Reid Spencer2004-07-251-1/+22
| | | | | | Provide parsing for the target triple and dependent libraries. llvm-svn: 15209
* bug 263:Reid Spencer2004-07-251-0/+2
| | | | | | Provide new tokens for target triples and dependent libraries. llvm-svn: 15208
* bug 122:Reid Spencer2004-07-181-48/+47
| | | | | | | | | | - 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
* Fix the regressions handling unnamed global variablesChris Lattner2004-07-161-2/+5
| | | | llvm-svn: 14870
* This is logically part of the last patch. Just more really horrible codeChris Lattner2004-07-141-17/+0
| | | | | | that is made unnecessary by it. llvm-svn: 14831
* ** Finally DeclareNewGlobalValue is dead!Chris Lattner2004-07-141-125/+90
| | | | | | | | | | | | | | | | | | | | * 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
* * Fairly substantial change. Instead of creating new globalvariables, thenChris Lattner2004-07-141-14/+49
| | | | | | | | | | 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
* Fold setValueNameMergingDuplicates into ParseGlobalVariable, allowing usChris Lattner2004-07-141-55/+38
| | | | | | | | | | | 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
* Fix a regression from last night. Apparently the CFE is broken and outputsChris Lattner2004-07-141-6/+16
| | | | | | | functions multiple times, expecting them to be merged. This should be fixed in the CFE, then here. llvm-svn: 14823
* Pull out code shared between GV forward-decl and definition processing.Chris Lattner2004-07-141-50/+37
| | | | | | | This gives us only a single call site for setValueNameMergingDuplicates. The next stage is the start merging them together. llvm-svn: 14811
* Simplify code. Do not allow functions to be redefined more than once.Chris Lattner2004-07-141-26/+9
| | | | | | | Since the stupid '%X = const int 4' thing is gone, we can now simplify setValueNameMergingDuplicates a bit more. llvm-svn: 14810
* Remove a gross and crufty "feature" that was never documented and doesn't work.Chris Lattner2004-07-142-7/+1
| | | | llvm-svn: 14809
* Finegrainify namespacificationChris Lattner2004-07-141-6/+4
| | | | llvm-svn: 14808
* Revamp handling of labels. In particular, if we create a forward referenceChris Lattner2004-07-141-22/+71
| | | | | | | | 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
* Split the basic block handling case out of getVal into getBBVal.Chris Lattner2004-07-141-34/+40
| | | | llvm-svn: 14805
* Fine-grainify namespacification, prune #includeChris Lattner2004-07-131-6/+2
| | | | llvm-svn: 14792
* Fix typeo and refactor bb productions to make it possible for us to reuse anyChris Lattner2004-07-131-11/+12
| | | | | | | | 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
* Eliminate some mega-cruft here. There is no reason to DERIVE FROM IR CLASSESChris Lattner2004-07-132-67/+26
| | | | | | | 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
* Inline the now trivial setValueNameInternal function into both callersChris Lattner2004-07-131-13/+10
| | | | llvm-svn: 14789
* Now that basic blocks are eagerly inserted into the Function, we can useChris Lattner2004-07-131-60/+12
| | | | | | | | 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
* A couple of substantial cleanup fixes:Chris Lattner2004-07-131-47/+72
| | | | | | | | | | | | | 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
* Replace a bunch of complex ConstantPointerRef referring code with simpleChris Lattner2004-07-131-11/+3
| | | | | | code. llvm-svn: 14785
* Don't call Type::setName()Chris Lattner2004-07-091-1/+1
| | | | llvm-svn: 14724
* Eliminate uses of the UniqueID field on Type objectsChris Lattner2004-07-081-23/+18
| | | | llvm-svn: 14707
* - remove use of isa<Type>(Val) since there's no inheritance relationshipReid Spencer2004-07-041-4/+3
| | | | | | | any more. Needed for bug 122 - #include <iostream> since Value.h doesn't include it any more. llvm-svn: 14621
* Remove use of Type::TypeTy which is no longer defined. This change neededReid Spencer2004-07-041-1/+1
| | | | | | for bug 122 since the "Type Type" concept is gone now. llvm-svn: 14620
* Rename Type::PrimitiveID to TypeId and ::getPrimitiveID() to ::getTypeID()Chris Lattner2004-06-172-3/+3
| | | | llvm-svn: 14201
* Remove some more dead code resulting from adding setTypeName().Reid Spencer2004-05-281-5/+1
| | | | llvm-svn: 13862
* Remove an assertion that uses Type::TypeTy that is never hit and willReid Spencer2004-05-271-12/+1
| | | | | | | break when Type::TypeTy goes away. Also remove a dead block of code and dead comments. llvm-svn: 13861
* Add support for dos-style filesChris Lattner2004-05-271-1/+1
| | | | llvm-svn: 13837
* Provide the correct patch for bug 345. The solution is to add a setTypeNameReid Spencer2004-05-261-7/+68
| | | | | | | | 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
* A quick and ugly hack to fix PR345. I used TypeTy specifically to makeChris Lattner2004-05-261-1/+7
| | | | | | Reid cringe :) llvm-svn: 13788
* Changed to use SymbolTable's new lookup interface.Reid Spencer2004-05-251-2/+2
| | | | llvm-svn: 13758
* Fix a memory leak. We leaked the vector holding the entries in switch tables.Chris Lattner2004-04-171-0/+1
| | | | llvm-svn: 13023
* Support getelementptr instructions which use uint's to index into structureChris Lattner2004-04-051-1/+26
| | | | | | | | | 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
* Avoid TRUE and FALSE which apparently conflict with some macros on OSXChris Lattner2004-03-312-7/+7
| | | | llvm-svn: 12566
* Fix bug: Assembler/2004-03-30-UnclosedFunctionCrash.llxChris Lattner2004-03-301-1/+1
| | | | llvm-svn: 12551
* Hrm, we were leaking ~1M of garbage that valgrind never told us about becauseChris Lattner2004-03-191-0/+8
| | | | | | it was "reachable". Cute. llvm-svn: 12515
* Allow parsing select instruction and constant exprChris Lattner2004-03-122-1/+16
| | | | llvm-svn: 12313
* Insert functions into the module promptly, not lazily. This fixes a bugChris Lattner2004-03-081-11/+2
| | | | | | I introduced last night. Note to self: test the *correct* tree... llvm-svn: 12220
* Eliminate a REALLY HORRIBLE API: mutateReferences, which is gross gross gross.Chris Lattner2004-03-081-5/+7
| | | | llvm-svn: 12212
* It turns out that the two dimensional vectors were causing big slowdownsChris Lattner2004-02-091-32/+34
| | | | | | | | | | | | | | | | | in this for programs with lots of types (like the testcase in PR224). The problem was that the type ID that the outer vector was using was not very dense (as many types are getting resolved), so the vector is large and gets reallocated a lot. Since there are a lot of values in the program (the .ll file is 10M), each reallocation has to copy the subvectors, which is also quite slow (this wouldn't be a problem if C++ supported move semantics, but it doesn't, at least not yet :( Changing the outer data structure to a map speeds a release build of llvm-as up from 11.21s to 5.13s on the testcase in PR224. llvm-svn: 11244
* When resolving upreferences, if multiple uprefs will be resolved to the sameChris Lattner2004-02-091-6/+24
| | | | | | | | type at the same time, resolve the upreferences to each other before resolving it to the outer type. This shaves off some time from the testcase in PR224, from 25.41s -> 21.72s. llvm-svn: 11241
* Adjust to the changed StructType interface. In particular, ↵Chris Lattner2004-02-091-2/+2
| | | | | | getElementTypes() is gone. llvm-svn: 11228
OpenPOWER on IntegriCloud