Chris Lattner
805ecf0c79
Fix grammar
...
llvm-svn: 22279
2005-06-24 18:00:40 +00:00
Andrew Lenharth
253145299b
If we support structs as va_list, we must pass pointers to them to va_copy
...
See last commit for LangRef, this implements it on all targets.
llvm-svn: 22273
2005-06-22 21:04:42 +00:00
Andrew Lenharth
d6bee05fc4
because some functions just use va_start and pass things to vfprintf
...
llvm-svn: 22269
2005-06-20 15:41:37 +00:00
Andrew Lenharth
717f1610f0
va_end fix
...
llvm-svn: 22262
2005-06-19 14:04:55 +00:00
Andrew Lenharth
aa1d999682
add a check for the mixing of vaarg and vanext with va_arg
...
llvm-svn: 22260
2005-06-19 03:53:56 +00:00
Andrew Lenharth
9144ec4764
core changes for varargs
...
llvm-svn: 22254
2005-06-18 18:34:52 +00:00
Chris Lattner
416a0d4c18
Give the asmparser the ability to parse strings. Patch contributed by
...
Alexander Friedman
llvm-svn: 22146
2005-05-20 03:25:47 +00:00
Misha Brukman
8b47707b5c
* Convert tabs to spaces, fix code alignment
...
* Remove trailing whitespace
* Wrap long lines
llvm-svn: 21844
2005-05-10 22:02:28 +00:00
Chris Lattner
53bdd31211
parse new calling conv specifiers
...
llvm-svn: 21748
2005-05-06 20:27:19 +00:00
Chris Lattner
6d817c5486
use splice instead of remove/insert for a minor speedup
...
llvm-svn: 21743
2005-05-06 19:58:35 +00:00
Chris Lattner
6409f3490a
remove some ugly hacks that are no longer needed since andrew removed the
...
varargs munging code
llvm-svn: 21742
2005-05-06 19:49:51 +00:00
Chris Lattner
0603845a49
Add a 'tail' marker for call instructions, patch contributed by
...
Alexander Friedman.
llvm-svn: 21722
2005-05-06 05:51:46 +00:00
Andrew Lenharth
f5d58d1bc3
Remove support for 1.0 style varargs
...
amusing of course, because we will have to go back to those semantics soon
llvm-svn: 21654
2005-05-02 19:07:27 +00:00
Chris Lattner
dcb82f5d0a
don't crash in some bad cases.
...
llvm-svn: 20776
2005-03-23 01:29:26 +00:00
Chris Lattner
a5f4b773d9
Remove a bunch of cruft and dead code for handling the case when types were
...
defined in function constant pools. The assembler grammar has long
disallowed functions from having constant pools, so all of this stuff is
dead.
This makes it an immediate error for functions to refer to nonexisting
types, fixing Regression/Verifier/2005-03-21-UndefinedTypeReference.ll.
Before, references to non-existing types in functions would only be
detected when the subsequent function was parsed, due to the call to
"ResolveTypes". "ResolveTypes" has not resolved any types for a long time,
instead it emitted an error message if no resolved types are left. Since
the only caller of this method is in the module code, just inline it.
llvm-svn: 20726
2005-03-21 06:27:42 +00:00
Chris Lattner
531f9e92d4
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!
llvm-svn: 20597
2005-03-15 04:54:21 +00:00
Chris Lattner
aa72c889a6
zap
...
llvm-svn: 20461
2005-03-05 19:04:07 +00:00
Chris Lattner
fc824c1a7e
add more checking
...
llvm-svn: 20296
2005-02-24 05:25:17 +00:00
Chris Lattner
5f0df0c1e6
Do not read free'd memory when printing an error message.
...
llvm-svn: 20295
2005-02-24 04:59:49 +00:00
Chris Lattner
06b6c4bbde
C++ is not a functional programming language.
...
llvm-svn: 20274
2005-02-22 23:13:58 +00:00
Chris Lattner
085c981345
Fix test/Regression/Assembler/2005-01-31-CallingAggregateFunction.ll
...
llvm-svn: 19966
2005-02-01 01:47:42 +00:00
Chris Lattner
2c08949c62
Adjust to slight changes in instruction interfaces.
...
llvm-svn: 19893
2005-01-29 00:35:55 +00:00
Chris Lattner
4270bcbab7
Add support for compilers with arg dependent name lookup, contributed by
...
Bjørn Wennberg
llvm-svn: 18628
2004-12-08 16:13:53 +00:00
Reid Spencer
95044d0071
For PR409: \
...
Make sure to check isValueValidForType on floating point constants and give \
an error if the value is not valid, otherwise it would assert in the VMCore
llvm-svn: 18584
2004-12-06 22:18:25 +00:00
Chris Lattner
aef74b55de
Fix PR463
...
llvm-svn: 18303
2004-11-28 16:45:45 +00:00
Chris Lattner
6ee2c57128
Plug a memory leak in the asmparser. It turns out that we were leaking
...
the strings for basic block labels in some cases. This amounted to about
120K of memory for namd, a medium sized program.
llvm-svn: 17262
2004-10-26 18:26:14 +00:00
Chris Lattner
4ff314968e
Parse undef and unreachable
...
llvm-svn: 17053
2004-10-16 18:17:13 +00:00
Chris Lattner
1f4739cd08
Add a check to avoid an assertion on malformed input
...
llvm-svn: 16861
2004-10-09 02:18:58 +00:00
Reid Spencer
f27c4cde06
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
b9e0877223
Add support for the link-time pass list to Modules.
...
llvm-svn: 16321
2004-09-13 23:44:23 +00:00
Reid Spencer
7c16caa336
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
04f4d52d9e
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
d0713e7664
quish a warning
...
llvm-svn: 15954
2004-08-20 18:07:39 +00:00
Brian Gaeke
0220904e7a
Packed types, brought to you by Brad Jones
...
llvm-svn: 15938
2004-08-20 06:00:58 +00:00
Chris Lattner
fca2833838
Work around PR424 for old c/c++ frontends.
...
llvm-svn: 15882
2004-08-17 17:26:41 +00:00
Alkis Evlogimenos
fd7a2d4477
Merge i*.h headers into Instructions.h as part of bug403.
...
llvm-svn: 15325
2004-07-29 12:17:34 +00:00
Chris Lattner
87dc093b10
Fix bug in previous patch :(
...
llvm-svn: 15226
2004-07-26 01:40:20 +00:00
Chris Lattner
c2cb34ae61
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
62c6da9a64
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
a24de0d15d
bug 263:
...
Provide parsing for the target triple and dependent libraries.
llvm-svn: 15209
2004-07-25 17:58:28 +00:00
Reid Spencer
ce6adaff1c
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
fe05024b0f
Fix the regressions handling unnamed global variables
...
llvm-svn: 14870
2004-07-16 01:18:09 +00:00
Chris Lattner
4babbe04e1
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
8abe1a11b4
** 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
4c9210ed64
* 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
e875d48a92
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
91393ee84f
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
42dd47437e
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
70ef57d001
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
6652224c2a
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