Commit Graph

113 Commits

Author SHA1 Message Date
Chris Lattner
dec628eead Switch ValueSymbolTable to use StringMap<Value*> instead of std::map<std::string, Value*>
as its main datastructure.  There are many improvements yet to be made, but
this speeds up opt --std-compile-opts on 447.dealII by 7.3%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34193 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-12 05:18:08 +00:00
Jim Laskey
95af592a63 Automatically generating intrinsic declarations from Dan Gohman. Modified
to construct FunctionType in separate function, and, have getDeclaration
return a Function instead of a Constant.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34008 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 20:38:26 +00:00
Reid Spencer
ef9b9a7939 For PR411:
This patch replaces the SymbolTable class with ValueSymbolTable which does
not support types planes. This means that all symbol names in LLVM must now
be unique. The patch addresses the necessary changes to deal with this and
removes code no longer needed as a result. This completes the bulk of the
changes for this PR. Some cleanup patches will follow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33918 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-05 20:47:22 +00:00
Reid Spencer
0fc052c36f For PR645:
Remove the Function::renameLocalSymbols function as it is no longer
needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33522 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-26 08:01:30 +00:00
Reid Spencer
78d033e086 For PR411:
Take an incremental step towards type plane elimination. This change
separates types from values in the symbol tables by finally making use
of the TypeSymbolTable class. This yields more natural interfaces for
dealing with types and unclutters the SymbolTable class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32956 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-06 07:24:44 +00:00
Reid Spencer
79e21d338c For PR950:
Change signed integer type names to unsigned equivalents.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32780 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31 05:26:44 +00:00
Reid Spencer
3da59db637 For PR950:
The long awaited CAST patch. This introduces 12 new instructions into LLVM
to replace the cast instruction. Corresponding changes throughout LLVM are
provided. This passes llvm-test, llvm/test, and SPEC CPUINT2000 with the
exception of 175.vpr which fails only on a slight floating point output
difference.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31931 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-27 01:05:10 +00:00
Reid Spencer
41562398b6 Remove unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31376 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-02 08:23:44 +00:00
Chris Lattner
b847423fc6 Implement Intrinsic::getName
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27108 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-25 06:32:47 +00:00
Chris Lattner
9a016ff284 Use the function name matcher autogenerated from the .td file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26664 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 20:35:01 +00:00
Chris Lattner
59bcce5ae5 remove dbg_declare, it's not used yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26659 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-09 20:02:42 +00:00
Chris Lattner
41edaa0529 remove the read/write port/io intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26479 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 00:19:58 +00:00
Chris Lattner
ffa987d3ee Split memcpy/memset/memmove intrinsics into i32/i64 versions, resolving
PR709, and paving the way for future progress.

Significantly refactor autoupgrading code, to handle the more complex case
(where we upgrade one argument in a function), and fix some bugs in it.

Testcase here: llvm/test/Regression/Bytecode/memcpy.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26474 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-02 23:58:40 +00:00
Reid Spencer
0b118206bf For PR411:
This patch is an incremental step towards supporting a flat symbol table.
It de-overloads the intrinsic functions by providing type-specific intrinsics
and arranging for automatically upgrading from the old overloaded name to
the new non-overloaded name. Specifically:
  llvm.isunordered -> llvm.isunordered.f32, llvm.isunordered.f64
  llvm.sqrt -> llvm.sqrt.f32, llvm.sqrt.f64
  llvm.ctpop -> llvm.ctpop.i8, llvm.ctpop.i16, llvm.ctpop.i32, llvm.ctpop.i64
  llvm.ctlz -> llvm.ctlz.i8, llvm.ctlz.i16, llvm.ctlz.i32, llvm.ctlz.i64
  llvm.cttz -> llvm.cttz.i8, llvm.cttz.i16, llvm.cttz.i32, llvm.cttz.i64
New code should not use the overloaded intrinsic names. Warnings will be
emitted if they are used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25366 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-16 21:12:35 +00:00
Chris Lattner
3776fea371 add a missing break that Reid noticed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25328 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-15 08:40:16 +00:00
Nate Begeman
6fb3bd6a65 Add bswap intrinsics as documented in the Language Reference
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25309 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-14 01:25:24 +00:00
Chris Lattner
71d0e3de8d Add recognition and verification of new llvm.stacksave/llvm.stackrestore intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25266 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 02:15:39 +00:00
Andrew Lenharth
51b8d54922 continued readcyclecounter support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24300 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-11 16:47:30 +00:00
Chris Lattner
d511898b58 add support for explicit calling conventions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21746 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-06 20:26:43 +00:00
Andrew Lenharth
691ef2ba06 Implement count leading zeros (ctlz), count trailing zeros (cttz), and count
population (ctpop).  Generic lowering is implemented, however only promotion
is implemented for SelectionDAG at the moment.

More coming soon.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21676 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-03 17:19:30 +00:00
Chris Lattner
eed37bad01 Add llvm.sqrt intrinsic, patch contributed by Morten Ofstad
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21627 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-30 03:44:07 +00:00
Misha Brukman
fd93908ae8 Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21427 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 23:48:37 +00:00
Andrew Lenharth
7f4ec3b2e3 First step in adding pcmarker intrinsic. Second step (soon) is adding backend support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20900 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-28 20:05:49 +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
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
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
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
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
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
Chris Lattner
caa4ae7c3f Add a new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18531 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-05 06:43:27 +00:00
Misha Brukman
e7a3f3e728 The Alpha (tm) intrinsics have never been used anywhere
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17340 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-29 18:43:17 +00:00
Chris Lattner
a28809d1fd Minor tweaks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16929 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-12 04:32:37 +00:00
Chris Lattner
4ec82eb1de Implement a new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16927 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-12 04:20:25 +00:00
Chris Lattner
4b83380f33 Implement remove/eraseFromParent methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16922 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-11 22:21:39 +00:00
Reid Spencer
551ccae044 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/.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-01 22:55:40 +00:00
Misha Brukman
44336292fc Fix #includes of i*.h files => Instructions.h as per PR403
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15327 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-29 16:53:53 +00:00
Reid Spencer
bb9051531c bug 122:
- Move GlobalValue and GlobalVariable implementations to Globals.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14929 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-17 23:50:19 +00:00
Chris Lattner
88e2b780cb Fix a really nasty logic error that VC noticed.
Reid, this might matter to you :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14774 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-12 20:27:31 +00:00
Chris Lattner
1c2fe31483 Implement new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14767 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-12 01:17:34 +00:00
Chris Lattner
4ee623de0b isnan is dead
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14191 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-15 21:52:58 +00:00
Alkis Evlogimenos
9685372062 Add the isunordered intrinsic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14159 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-12 19:19:14 +00:00
Chris Lattner
137cc4fc8c I misled Alkis: LLVM should have isnan, not isunordered.
isunordered(X, Y) === isnan(X) | isnan(Y)

Remove isunordered, add isnan.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14132 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-11 02:29:43 +00:00
Alkis Evlogimenos
f616f22e81 Add the isunordered intrinsic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14127 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-11 01:08:18 +00:00
Chris Lattner
e899705c27 Recognize and verify the new GC intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13687 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-23 21:16:51 +00:00
John Criswell
994a765e5c Finish adding the llvm.readio and llvm.writeio intrinsics.
Sorry these didn't get in yesterday.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12942 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-14 13:46:52 +00:00
John Criswell
9570301ee8 Added the llvm.readport and llvm.writeport intrinsics.
The Verifier ensures that their parameters are of integral types and have
the correct sign, but it does not enforce any size restrictions because
such restrictions are platform dependent.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12781 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-08 20:27:38 +00:00
Chris Lattner
317201d773 Rename the intrinsic enum values for llvm.va_* from Intrinsic::va_* to
Intrinsic::va*.  This avoid conflicting with macros in the stdlib.h file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12356 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-13 00:24:00 +00:00
Chris Lattner
cf89908381 Add llvm.memset/frameaddress/returnaddress intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11431 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-14 02:47:17 +00:00
Chris Lattner
2751e76a70 Add support for the llvm.memmove intrinsic
Patch graciously contributed by Reid Spencer!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11355 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-12 18:11:20 +00:00