Commit Graph

8214 Commits

Author SHA1 Message Date
Devang Patel
c79e118247 Add "check/remove dbg var" helper routines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66223 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-06 00:19:37 +00:00
Nick Lewycky
731c6abc46 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66157 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-05 08:20:44 +00:00
Gabor Greif
f3841fcbd5 ooops, forgot to include the pointless-write eliminator in my previous checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66081 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-04 21:54:31 +00:00
Dale Johannesen
508d338fee Add some cautionary comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66080 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-04 21:53:29 +00:00
Chris Lattner
e97c733541 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66076 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-04 21:40:23 +00:00
Dale Johannesen
6129e24e49 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66073 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-04 21:24:04 +00:00
Chris Lattner
35033a5876 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66072 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-04 21:21:36 +00:00
Gabor Greif
c23b8719ef 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66061 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-04 20:36:44 +00:00
Gabor Greif
c7f6b8c5d4 "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 :-)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66026 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-04 06:57:48 +00:00
Dale Johannesen
160ae86936 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65992 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-04 01:14:28 +00:00
Devang Patel
70b5e04d85 Dbg Intrinsics do not access memory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65975 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-03 22:33:54 +00:00
Dan Gohman
12f7cab423 Make a comment less terse.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65953 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-03 17:44:54 +00:00
Dan Gohman
0f8b53f19d Fix a bunch of Doxygen syntax issues. Escape special characters,
and put @file directives on their own comment line.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65920 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-03 02:55:14 +00:00
Dale Johannesen
bd8e650876 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).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65910 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-03 01:09:07 +00:00
Bob Wilson
24e338e8a3 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65899 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-02 23:24:16 +00:00
Gabor Greif
83b5752747 drop support for GCC 2.x as it is hopelessly broken anyway
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65864 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-02 19:49:29 +00:00
Gabor Greif
1012919ed8 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65843 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-02 14:47:45 +00:00
Gabor Greif
5b78a7cabe remove a deprecated interface that was pretty useless
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65842 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-02 12:42:07 +00:00
Gabor Greif
e6d68200ee fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65839 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-02 12:10:56 +00:00
Mikhail Glushenkov
95e2aa8967 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).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65825 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-02 09:03:02 +00:00
Mikhail Glushenkov
bd21c83d64 Cosmetic fixes: include guards.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65824 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-02 09:02:28 +00:00
Mikhail Glushenkov
41f36f456b Plugin::Priority() doesn't need to be pure virtual.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65823 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-02 09:02:01 +00:00
Mikhail Glushenkov
f5178ce144 Add a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65822 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-02 09:01:39 +00:00
Mikhail Glushenkov
f188178a2f 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65821 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-02 09:01:14 +00:00
Gabor Greif
5e7d4d643d Another sentinel optimization. This one should always
be a win, since almost every interesting function has at least one Argument.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65778 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-01 17:13:15 +00:00
Gabor Greif
abd6f28a74 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65776 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-01 16:38:10 +00:00
Gabor Greif
1f3bd7a2ee fix a comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65768 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-01 09:45:52 +00:00
Gabor Greif
1a31d09a16 Fix a typo. Thanks baldrick!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65767 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-01 09:43:41 +00:00
Chris Lattner
d2b6cb0a2b simplify handling "don't print top level name" processing, so that we get
stuff like %A = type { %A*} instead of an upref.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65748 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-01 01:16:21 +00:00
Bob Wilson
a27ea9e89f Combine PPC's GetConstantBuildVectorBits and isConstantSplat functions to a new
method in a BuildVectorSDNode "pseudo-class".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65747 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-01 01:13:55 +00:00
Chris Lattner
e9fa33eb66 move type name population out of TypePrinting class into a static
AsmWriter.cpp method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65736 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-28 23:20:19 +00:00
Chris Lattner
ae3042316f delete a bunch of duplicated type printing logic, using the type printing
stuff in AsmWriter.cpp for Type::getDescription().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65734 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-28 23:01:57 +00:00
Gabor Greif
7eef1800ea add description how the ilist_traits<Instruction> works
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65732 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-28 22:46:37 +00:00
Chris Lattner
6fa088393e the module is not required to exist, allow it to default, giving this
class a nice default ctor.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65731 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-28 22:41:33 +00:00
Chris Lattner
a725c45e9e disable copying and assignment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65730 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-28 22:35:24 +00:00
Chris Lattner
d8030a7179 expose TypePrinting as a public API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65729 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-28 22:34:45 +00:00
Chris Lattner
c287137ce7 Change WriteTypeSymbolic to not put a space out before types, also, remove
the old std::ostream version.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65720 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-28 21:05:51 +00:00
Gabor Greif
b141e397d5 make traits more flexible by splitting out node-related fragment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65690 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-28 10:17:32 +00:00
Evan Cheng
9a5c4e09f5 Avoid unused parameter warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65670 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-28 01:10:24 +00:00
Gabor Greif
a05764c4fb group friendship
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65633 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-27 15:46:23 +00:00
Rafael Espindola
9a58023c6c 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.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65632 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-27 13:37:18 +00:00
Gabor Greif
1c17ca10b5 fix comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65627 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-27 09:33:37 +00:00
Gabor Greif
0a0e68a7ea 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65626 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-27 08:41:37 +00:00
Dan Gohman
927793b6a1 Make LoopInfo::print() identify header, exit, and latch blocks,
and print the loop depth.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65593 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-27 00:05:54 +00:00
Gabor Greif
9de4221e6e remove deleteNode definition, it is inherited in an identical fashion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65565 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-26 19:37:54 +00:00
Evan Cheng
236aa8a503 ADDS{D|S}rr_Int and MULS{D|S}rr_Int are not commutable. The users of these intrinsics expect the high bits will not be modified.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65499 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-26 03:12:02 +00:00
Bob Wilson
7b048b391f Fix a duplicated word in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65496 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-26 00:58:09 +00:00
Evan Cheng
a87008d90b Revert BuildVectorSDNode related patches: 65426, 65427, and 65296.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65482 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-25 22:49:59 +00:00
Evan Cheng
e3d423244a Clean up dwarf writer, part 1. This eliminated the horrible recursive getGlobalVariablesUsing and replaced it something readable. It eliminated use of slow UniqueVector and replaced it with StringMap, SmallVector, and DenseMap, etc. It also fixed some non-deterministic behavior.
This is a very minor compile time win.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65438 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-25 07:04:34 +00:00
Scott Michel
8f1579aedc Expand tabs to spaces (overlooked in previous commit)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65427 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-25 03:57:49 +00:00