Gabor Greif
44e8c8d791
Remove the burden of dealing with list offsets
...
from SymbolTableListTraits' clients, and
intead request a nice declarative interface.
Cleans up an IMHO ugly wart.
llvm-svn: 66331
2009-03-07 10:00:35 +00:00
Daniel Dunbar
4050346c70
Add IRBuilder::CreateConstGEP{1, 2}_{32, 64}.
...
- Names are lame, but it seems better to be explicit.
llvm-svn: 66295
2009-03-06 22:26:07 +00:00
Daniel Dunbar
d9a5a0cf1f
Add Module::getNamedValue; use to normalize access to Module symbol
...
table.
- No functionality change.
llvm-svn: 66289
2009-03-06 22:04:43 +00:00
Tanya Lattner
89fb9b206e
Add default constructor to SDNode to make gcc 3.4.6 happy.
...
llvm-svn: 66280
2009-03-06 18:17:45 +00:00
Chris Lattner
9457b5ea59
some nits noticed by Duncan
...
llvm-svn: 66274
2009-03-06 17:05:04 +00:00
Chris Lattner
33852b4f35
Sprinkle some PrettyStackEntry magic into the passmanager. With this, we now
...
get nice and happy stack traces when we crash in an optimizer or codegen. For
example, an abort put in UnswitchLoops now looks like this:
Stack dump:
0. Program arguments: clang pr3399.c -S -O3
1. <eof> parser at end of file
2. per-module optimization passes
3. Running pass 'CallGraph Pass Manager' on module 'pr3399.c'.
4. Running pass 'Loop Pass Manager' on function '@foo'
5. Running pass 'Unswitch loops' on basic block '%for.inc'
Abort
llvm-svn: 66260
2009-03-06 06:45:05 +00:00
Gabor Greif
37f9a76ed1
do not close friendship with every odd class
...
llvm-svn: 66229
2009-03-06 01:09:27 +00:00
Devang Patel
28a28a2588
Add "check/remove dbg var" helper routines.
...
llvm-svn: 66223
2009-03-06 00:19:37 +00:00
Nick Lewycky
dbd222fd42
Regenerate.
...
llvm-svn: 66157
2009-03-05 08:20:44 +00:00
Gabor Greif
5291d4d65b
ooops, forgot to include the pointless-write eliminator in my previous checkin
...
llvm-svn: 66081
2009-03-04 21:54:31 +00:00
Dale Johannesen
4dbff7846e
Add some cautionary comments.
...
llvm-svn: 66080
2009-03-04 21:53:29 +00:00
Chris Lattner
84424b02bb
add some helper classes for building light-weight symbolic stack traces
...
that get printed when a program crashes. This is the first step of many.
llvm-svn: 66076
2009-03-04 21:40:23 +00:00
Dale Johannesen
448293322b
Re-commit 65975 and a fix for the problem that
...
was causing llvm-gcc to fail to build. I've
verified it bootstraps now; good enough for me.
llvm-svn: 66073
2009-03-04 21:24:04 +00:00
Chris Lattner
faf39c40d4
Add a new 'AddSignalHandler' function to Signals.h that allows
...
arbitrary functions to be run when a crash happens. Delete
RemoveDirectoryOnSignal as it is dead and has never had clients.
Change PrintStackTraceOnErrorSignal to be implemented in terms of
AddSignalHandler.
I updated the Win32 versions of these APIs, but can't test them.
If there are any problems, I'd be happy to fix them as well.
llvm-svn: 66072
2009-03-04 21:21:36 +00:00
Gabor Greif
9a8e64c76f
Give sentinel traits the right to determine the policy where the sentinel is kept.
...
This should result in less indirect memory accesses, less dead writes and tighter code.
llvm-svn: 66061
2009-03-04 20:36:44 +00:00
Gabor Greif
f8d2f7429d
"Ghostify" embedded sentinels. This is a real win in all cases
...
because less bytes are allocated and subobject construction is gone.
For reference how it works, see BasicBlock.h.
Btw. it is very assuring to see that somebody has invented
this ilist-embedded sentinel technique before me :-)
llvm-svn: 66026
2009-03-04 06:57:48 +00:00
Dale Johannesen
b26bc461f0
Temporarily revert 65975, which breaks the llvm-gcc build.
...
While the patch is clearly correct in itself, it's become
apparent other places are assuming debug intrinsics are
marked as touching memory...this needs more testing.
llvm-svn: 65992
2009-03-04 01:14:28 +00:00
Devang Patel
dd0b382f55
Dbg Intrinsics do not access memory.
...
llvm-svn: 65975
2009-03-03 22:33:54 +00:00
Dan Gohman
cf43db79cc
Make a comment less terse.
...
llvm-svn: 65953
2009-03-03 17:44:54 +00:00
Dan Gohman
51d4e8db6a
Fix a bunch of Doxygen syntax issues. Escape special characters,
...
and put @file directives on their own comment line.
llvm-svn: 65920
2009-03-03 02:55:14 +00:00
Dale Johannesen
33fa9dc8a9
When sinking an insn in InstCombine bring its debug
...
info with it.
Don't count debug info insns against the scan maximum
in FindAvailableLoadedValue (lest they affect codegen).
llvm-svn: 65910
2009-03-03 01:09:07 +00:00
Bob Wilson
5b276b6bc9
Generalize BuildVectorSDNode::isConstantSplat to use APInts and handle
...
arbitrary vector sizes. Add an optional MinSplatBits parameter to specify
a minimum for the splat element size. Update the PPC target to use the
revised interface.
llvm-svn: 65899
2009-03-02 23:24:16 +00:00
Gabor Greif
63c1d08d66
drop support for GCC 2.x as it is hopelessly broken anyway
...
llvm-svn: 65864
2009-03-02 19:49:29 +00:00
Gabor Greif
2b1114593e
Declare Sentinel fragments as mutable to get rid
...
of some pointless casting. This fragment logically
does not belong to ilist anyway, but to "ghostly"
NodeType.
llvm-svn: 65843
2009-03-02 14:47:45 +00:00
Gabor Greif
267542aaa5
remove a deprecated interface that was pretty useless
...
llvm-svn: 65842
2009-03-02 12:42:07 +00:00
Gabor Greif
f30dc30eea
fix typo
...
llvm-svn: 65839
2009-03-02 12:10:56 +00:00
Mikhail Glushenkov
3f2bbd6301
Move code from Main.cpp to the include dir.
...
User drivers based on llvmc must all share the initialization code.
Putting main() into libCompilerDriver is not a very good idea IMO (and ld gave
me some strange EH-related error anyway).
llvm-svn: 65825
2009-03-02 09:03:02 +00:00
Mikhail Glushenkov
6987e30144
Cosmetic fixes: include guards.
...
llvm-svn: 65824
2009-03-02 09:02:28 +00:00
Mikhail Glushenkov
0ce41a4c26
Plugin::Priority() doesn't need to be pure virtual.
...
llvm-svn: 65823
2009-03-02 09:02:01 +00:00
Mikhail Glushenkov
1a0ddf169b
Add a comment.
...
llvm-svn: 65822
2009-03-02 09:01:39 +00:00
Mikhail Glushenkov
3cde18e191
Reorganize llvmc code.
...
Move the code from 'llvmc/driver' into a new CompilerDriver library, and change
the build system accordingly. Makes it easier for projects using LLVM to build
their own llvmc-based drivers.
Tested with objdir != srcdir.
llvm-svn: 65821
2009-03-02 09:01:14 +00:00
Gabor Greif
3f56efbf04
Another sentinel optimization. This one should always
...
be a win, since almost every interesting function has at least one Argument.
llvm-svn: 65778
2009-03-01 17:13:15 +00:00
Gabor Greif
dc34b050a2
Reuse a technique (pioneered for BasicBlocks) of superposing ilist with
...
its sentinel. This is quite a win when a function really has a basic block.
When the function is just a declaration (and stays so) the old way did not
allocate a sentinel. So this change is most beneficial when the ratio of
function definition to declaration is high. I.e. linkers etc. Incidentally
these are the most resource demanding applications, so I expect that the
reduced malloc traffic, locality and space savings outweigh the cost of
addition of two pointers to Function.
llvm-svn: 65776
2009-03-01 16:38:10 +00:00
Gabor Greif
9849b23219
fix a comment
...
llvm-svn: 65768
2009-03-01 09:45:52 +00:00
Gabor Greif
9b3fe3d625
Fix a typo. Thanks baldrick!
...
llvm-svn: 65767
2009-03-01 09:43:41 +00:00
Chris Lattner
0cefb564d4
simplify handling "don't print top level name" processing, so that we get
...
stuff like %A = type { %A*} instead of an upref.
llvm-svn: 65748
2009-03-01 01:16:21 +00:00
Bob Wilson
7482f84ae6
Combine PPC's GetConstantBuildVectorBits and isConstantSplat functions to a new
...
method in a BuildVectorSDNode "pseudo-class".
llvm-svn: 65747
2009-03-01 01:13:55 +00:00
Chris Lattner
1a7eac8434
move type name population out of TypePrinting class into a static
...
AsmWriter.cpp method.
llvm-svn: 65736
2009-02-28 23:20:19 +00:00
Chris Lattner
2396ce476a
delete a bunch of duplicated type printing logic, using the type printing
...
stuff in AsmWriter.cpp for Type::getDescription().
llvm-svn: 65734
2009-02-28 23:01:57 +00:00
Gabor Greif
2def3e8ae7
add description how the ilist_traits<Instruction> works
...
llvm-svn: 65732
2009-02-28 22:46:37 +00:00
Chris Lattner
34181d9bcc
the module is not required to exist, allow it to default, giving this
...
class a nice default ctor.
llvm-svn: 65731
2009-02-28 22:41:33 +00:00
Chris Lattner
28f2b3c2a4
disable copying and assignment.
...
llvm-svn: 65730
2009-02-28 22:35:24 +00:00
Chris Lattner
03e16b833f
expose TypePrinting as a public API.
...
llvm-svn: 65729
2009-02-28 22:34:45 +00:00
Chris Lattner
f47615197e
Change WriteTypeSymbolic to not put a space out before types, also, remove
...
the old std::ostream version.
llvm-svn: 65720
2009-02-28 21:05:51 +00:00
Gabor Greif
5d9be2cffd
make traits more flexible by splitting out node-related fragment
...
llvm-svn: 65690
2009-02-28 10:17:32 +00:00
Evan Cheng
c26c11bbd0
Avoid unused parameter warning.
...
llvm-svn: 65670
2009-02-28 01:10:24 +00:00
Gabor Greif
078dabaf4a
group friendship
...
llvm-svn: 65633
2009-02-27 15:46:23 +00:00
Rafael Espindola
880e63bf01
Refactor TLS code and add some tests. The tests and expected results are:
...
pic | declaration | linkage | visibility |
!pic | declaration | external | default | tls1.ll tls2.ll | local exec
pic | declaration | external | default | tls1-pic.ll tls2-pic.ll | general dynamic
!pic | !declaration | external | default | tls3.ll tls4.ll | initial exec
pic | !declaration | external | default | tls3-pic.ll tls4-pic.ll | general dynamic
!pic | declaration | external | hidden | tls7.ll tls8.ll | local exec
pic | declaration | external | hidden | X | local dynamic
!pic | !declaration | external | hidden | tls9.ll tls10.ll | local exec
pic | !declaration | external | hidden | X | local dynamic
!pic | declaration | internal | default | tls5.ll tls6.ll | local exec
pic | declaration | internal | default | X | local dynamic
The ones marked with an X have not been implemented since local dynamic is not implemented.
llvm-svn: 65632
2009-02-27 13:37:18 +00:00
Gabor Greif
154b0b2765
fix comments
...
llvm-svn: 65627
2009-02-27 09:33:37 +00:00
Gabor Greif
9b51fe4ab1
Introduce a new technique for merging BasicBlock with Instruction sentinel by superposition.
...
This looks dangerous, but isn't because the sentinel is accessed in special way only,
namely the Next and Prev fields of it, and these are guaranteed to exist.
llvm-svn: 65626
2009-02-27 08:41:37 +00:00