Commit Graph

2218 Commits

Author SHA1 Message Date
Tanya Lattner
0561f78a14 Revertin 50867 since it was breaking the build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50871 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-08 21:54:20 +00:00
Mikhail Glushenkov
194a78f149 Add -E and -S options
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50868 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-08 20:02:36 +00:00
Mikhail Glushenkov
21607fa63c A small refactoring (extract method) + some comment fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50867 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-08 20:02:03 +00:00
Mikhail Glushenkov
4561ab5d81 Use Doxygen-style comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50833 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-07 21:50:19 +00:00
Owen Anderson
77a895e599 Disable loop deletion until the release branch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50787 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 23:56:34 +00:00
Mikhail Glushenkov
e0ff9ae91e Change from llvm::SmallSet<std::string> to llvm::StringMap<char>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50766 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 18:18:58 +00:00
Mikhail Glushenkov
29063554d0 Add new edge property combinator: weight.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50765 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 18:18:20 +00:00
Mikhail Glushenkov
6a6cd729aa Add a help string for the -c option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50764 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 18:17:42 +00:00
Mikhail Glushenkov
77ddce97ad Update documentation to reflect the current state of affairs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50763 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 18:17:19 +00:00
Mikhail Glushenkov
be86712de8 Some cosmetic changes (change some comments, move code around a bit).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50762 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 18:16:52 +00:00
Mikhail Glushenkov
4c11a62d69 Refactoring: split the function CompilationGraph::Build() into two parts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50760 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 18:15:35 +00:00
Mikhail Glushenkov
76b1b24dc8 Use edge weights to choose the right linker based on input language names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50759 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 18:15:12 +00:00
Mikhail Glushenkov
bb8b58dcf3 Add weights to graph edges. Choose between edges based on their weight.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50757 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 18:14:24 +00:00
Mikhail Glushenkov
d83038c960 Remove the UnpackValues() function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50756 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 18:13:45 +00:00
Mikhail Glushenkov
978d498e40 Add a --linker command-line option, make all tests pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50755 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 18:13:00 +00:00
Mikhail Glushenkov
895820da24 Naming fix: LLVMCCConfigurationEmitter -> LLVMCConfigurationEmitter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50754 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 18:12:03 +00:00
Mikhail Glushenkov
87416b4cea Add -x option (like in gcc).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50750 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 18:10:53 +00:00
Mikhail Glushenkov
35a85e8453 Take object file as input and handle files with the same name correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50749 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 18:10:20 +00:00
Mikhail Glushenkov
be9d9a153f Add output redirection, rename namespace llvmcc to namespace llvmc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50746 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 18:08:59 +00:00
Mikhail Glushenkov
f7bab8c743 Make AutoGenerated.inc depend also on Tools.td and Common.td
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50745 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 18:08:12 +00:00
Mikhail Glushenkov
3d688228f6 Utilize topological sort in CompilationGraph::Build().
This makes more interesting graph topologies possible. Currently all tests pass,
but more testing is needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50744 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 18:07:48 +00:00
Mikhail Glushenkov
0260658079 Add TopologicalSort method to CompilationGraph.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50743 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 18:07:14 +00:00
Mikhail Glushenkov
d7bb87a5a3 Do not require positional arguments when we're only printing out the graph.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50742 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 17:44:16 +00:00
Mikhail Glushenkov
4f6e3a497e Make ChooseEdge more generic and use it to choose between different toolchains.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50741 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 17:28:03 +00:00
Mikhail Glushenkov
bbbc9d4384 Remove unnecessary argument from PassThroughGraph
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50740 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 17:27:37 +00:00
Mikhail Glushenkov
c74bfc946d Add inward edge counters to Nodes; Associate JoinLists with JoinTools.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50738 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 17:26:53 +00:00
Mikhail Glushenkov
97fda6d915 Enhancements for --view-graph
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50737 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 17:26:14 +00:00
Mikhail Glushenkov
2ba4c5abab Split the Build function into two parts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50736 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 17:25:51 +00:00
Mikhail Glushenkov
d81887841c Make llvmc return 1 when the compilation fails.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50735 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 17:25:23 +00:00
Mikhail Glushenkov
b96cb60827 Return const char* instead of std::string in Tool classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50733 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 17:24:26 +00:00
Mikhail Glushenkov
6591c8938c Add an ability to choose between different edges based on edge properties.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50732 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 17:23:50 +00:00
Mikhail Glushenkov
64683edb4d Add new edge properties: parameter_equals, element_in_list, and.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50730 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 17:22:47 +00:00
Mikhail Glushenkov
581936a99c Implemented switch_on edge property.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50729 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 17:22:03 +00:00
Mikhail Glushenkov
a4db8c070f Cosmetic change: if( -> if (
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50728 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 16:37:33 +00:00
Mikhail Glushenkov
e74420ab24 Remove ExampleWithOpt.td: this file was merged with Example.td.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50727 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 16:37:12 +00:00
Mikhail Glushenkov
d752c3ffd8 More work on edge properties. Use Edge classes instead of strings in CompilationGraph.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50726 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 16:36:50 +00:00
Mikhail Glushenkov
0a174930e2 Ongoing work: add an edge typechecker, rudimentary support for edge properties.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50725 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 16:36:06 +00:00
Mikhail Glushenkov
0d08db0345 Convert internal representation to use DAG. This gives us more flexibility and enables future improvements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50724 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 16:35:25 +00:00
Mikhail Glushenkov
aa4948f992 Small const-correctness fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50723 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 16:34:39 +00:00
Mikhail Glushenkov
b90cd834ca Code reorg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50722 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 16:34:12 +00:00
Owen Anderson
3f3d95c75a Enable dead loop elimination.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50682 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-05 23:38:07 +00:00
Anton Korobeynikov
cae8ccd12d Drop llvmc also, it will be replaced by shiny new llvmc2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50615 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-04 06:19:55 +00:00
Anton Korobeynikov
a9d9ca469f Drop llvm2cpp, it's now a llc target
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50614 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-04 06:16:50 +00:00
Chris Lattner
866b9e1520 move libcalls to the same place llvm-gcc has it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50593 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-02 22:05:06 +00:00
Anton Korobeynikov
9ef7425a4d Add possibility of using arbitrary to to execute stuff from bugpoint.
Patch by Pekka Jääskeläinen!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50373 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-28 20:53:48 +00:00
Chris Lattner
e78109eb3a several multiple-retval fixes for bugpoint.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50331 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-28 00:04:58 +00:00
Nick Lewycky
280a6e607d Remove 'unwinds to' support from mainline. This patch undoes r47802 r47989
r48047 r48084 r48085 r48086 r48088 r48096 r48099 r48109 and r48123.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50265 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-25 16:53:59 +00:00
Anton Korobeynikov
9692db9c09 Disable building of llvm2cpp. The directory will be removed before 2.3 release.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50193 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-23 22:46:24 +00:00
Anton Korobeynikov
5027652b8a First step of implementing PR1538: move llvm2cpp logic to new 'target'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50189 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-23 22:29:24 +00:00
Bill Wendling
480311b548 Use the Create static method for some of these objects. They no longer
have public constructors. This should fix PR2246.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50145 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-23 07:13:17 +00:00
Owen Anderson
d2368dc344 Move MemCpyOpt after GVN.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50097 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-22 07:12:26 +00:00
Evan Cheng
c290a5b9ff Added command line option -no-lazy to disable JIT lazy compilation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50095 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-22 06:51:41 +00:00
Owen Anderson
ecbc963eda Add MemCpyOpt to LTO.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50081 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-22 03:57:36 +00:00
Gabor Greif
f1f12f91e8 fix some residual old API that fell thru the cracks of the conversion script, closes http://llvm.org/bugs/show_bug.cgi?id=2246
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50062 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-21 21:31:55 +00:00
Owen Anderson
eb60fb9c1f Use GVN in LTO instead of GCSE+LoadVN.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50036 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-21 07:51:07 +00:00
Chris Lattner
1d40281ae6 Add jump threading to liblto.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50028 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-21 04:31:40 +00:00
Chris Lattner
e12d8e422d run the jump threading pass in llvm-ld also
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50027 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-21 04:28:40 +00:00
Chris Lattner
2510c3b70f enable jump threading pass by default. This causes no miscompilations
and can significantly shrinkify some code, particularly from C++ land.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50025 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-21 04:22:09 +00:00
Duncan Sands
fa191e4cd4 Run SimplifyLibCalls near the beginning, not at
the end.  It is now run at the same moment as in
llvm-gcc.  Also, run StripDeadPrototypes at the
end, just before running DeadTypeElimination.
This may be useful when doing LTO.  Note that
llvm-gcc runs StripDeadPrototypes but not
DeadTypeElimination.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49848 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-17 12:03:38 +00:00
Dan Gohman
33ef2bb268 Fix a memory leak in llc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49793 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 15:56:26 +00:00
Owen Anderson
6bc41e8a74 Revert r49614. As Dan pointed out, some of these aren't correct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49657 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-14 17:38:21 +00:00
Owen Anderson
386ea355e7 Replace calls of the form V1->setName(V2->getName()) with V1->takeName(V2),
which is significantly more efficient.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49614 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-13 19:15:17 +00:00
Evan Cheng
5d4ed3ba11 Move memcpy / memset optimization pass after GVN.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49457 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-10 01:33:05 +00:00
Owen Anderson
a723d1e48f Factor a bunch of functionality related to memcpy and memset transforms out of
GVN and into its own pass.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49419 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-09 08:23:16 +00:00
Tanya Lattner
cb76b12a3a Remove llvm-upgrade.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49347 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-07 18:32:47 +00:00
Duncan Sands
e2c4304654 Use Intrinsic::getDeclaration in more places.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49338 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-07 13:45:04 +00:00
Bill Wendling
58f3bcdbb9 Remove tabs. Patch by Mike Stump!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49317 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-07 05:47:52 +00:00
Gabor Greif
051a950000 API changes for class Use size reduction, wave 1.
Specifically, introduction of XXX::Create methods
for Users that have a potentially variable number of
Uses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49277 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-06 20:25:17 +00:00
Torok Edwin
af4fc28b56 -fPIC is required on x86-64 when building shared objects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49274 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-06 12:42:29 +00:00
Devang Patel
e27847056d Reenable running StripSymbols when EH is on.
Dale fixed EH.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49192 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-03 21:30:06 +00:00
Dale Johannesen
dedf502fba Make EH work with unnamed functions. Reenable running
StripSymbols when EH is on.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49110 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02 20:10:52 +00:00
Chris Lattner
038112a4e0 Change the MemoryBuffer::getFile* methods to take just a pointer to the
start of a filename, not a filename+length.  All clients can produce a
null terminated name, and the system api's require null terminated 
strings anyway.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49041 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-01 18:04:03 +00:00
Chris Lattner
8c2ec51a7f stop building llvmc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48964 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-30 18:58:05 +00:00
Anton Korobeynikov
5f2e499520 Honour another bunch of parameter attributes in llvm2cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48942 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-29 11:25:49 +00:00
Anton Korobeynikov
e818717e0c Honour ByVal parameter attribute in llvm2cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48941 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-29 11:15:01 +00:00
Mikhail Glushenkov
4d9c9e9d31 Another test commit (with git-svn)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48843 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-26 21:37:43 +00:00
Mikhail Glushenkov
56ba12c497 Test commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48840 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-26 21:18:58 +00:00
Anton Korobeynikov
1cf962b874 Fix the Cygwin/Mingw-On-Cygwin build. Patch by Alain Frisch!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48786 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-25 18:53:36 +00:00
Tanya Lattner
6fefa6a12b Disable building llvm-upgrade.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48764 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-25 05:05:58 +00:00
Andrew Lenharth
df4613ced2 With debug info, there are nameless constant global values. do not crash when we hit one
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48749 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-24 22:16:14 +00:00
Bill Wendling
16b412c6e2 Small format/grammar changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48723 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-24 05:58:47 +00:00
Bill Wendling
ae851b63af Grammar Nazi strikes! :-)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48722 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-24 05:55:54 +00:00
Anton Korobeynikov
ac67b7ea8f Add first proof-of-concept universal compiler driver framework based
on ideas mentioned in PR686.
Written by Mikhail Glushenkov and contributed by Codedgers, Inc.

Old llvmc will be removed soon after new one will have all its properties.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48699 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-23 08:57:20 +00:00
Andrew Lenharth
230293b4c5 style and spelling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48562 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-19 22:32:43 +00:00
Andrew Lenharth
50b5742157 llvm-ld deserves disable-verify too. opt shouldn't have all the fun options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48550 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-19 20:49:51 +00:00
Chris Lattner
58d74910c6 Reimplement the parameter attributes support, phase #1. hilights:
1. There is now a "PAListPtr" class, which is a smart pointer around
   the underlying uniqued parameter attribute list object, and manages
   its refcount.  It is now impossible to mess up the refcount.
2. PAListPtr is now the main interface to the underlying object, and
   the underlying object is now completely opaque.
3. Implementation details like SmallVector and FoldingSet are now no
   longer part of the interface.
4. You can create a PAListPtr with an arbitrary sequence of
   ParamAttrsWithIndex's, no need to make a SmallVector of a specific 
   size (you can just use an array or scalar or vector if you wish).
5. All the client code that had to check for a null pointer before
   dereferencing the pointer is simplified to just access the 
   PAListPtr directly.
6. The interfaces for adding attrs to a list and removing them is a
   bit simpler.

Phase #2 will rename some stuff (e.g. PAListPtr) and do other less 
invasive changes.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48289 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-12 17:45:29 +00:00
Andrew Lenharth
c77e4d1569 only extract main if the user didn't specify anything to extract
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48023 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-07 20:10:54 +00:00
Andrew Lenharth
6a021a4dda make error message reflect default search function name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48021 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-07 20:07:24 +00:00
Andrew Lenharth
d245a8ae47 add a pass that can extract all kinds of global values, not just functions. Update llvm-extract to use it and optionally extract a global variable if you want it too
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48015 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-07 19:51:57 +00:00
Tanya Lattner
8f3153e217 Renable lto2 build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47845 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-03 17:32:40 +00:00
Nick Kledzik
873570e0ef suppress extra -install_name on Tiger. The 10.4 tools don't support it. Fix whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47817 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-02 06:33:06 +00:00
Nick Lewycky
fc82fabe00 Add an unwind_to field to basic blocks, making them Users instead of Values.
This is the first checkin for PR1269, the new EH infrastructure.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47802 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-02 02:48:09 +00:00
Nick Lewycky
33a834a6f6 Also handle "getresult".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47797 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-01 21:47:06 +00:00
Tanya Lattner
e5101bf52c Disable lto because its broken on tiger.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47783 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-01 07:36:30 +00:00
Nick Kledzik
1f008a88f9 stop building lto on all platforms. Start building lto2 on Darwin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47762 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-29 19:31:29 +00:00
Nick Kledzik
4ed55ceeaf also pass -compatibility_version when linking shared object for Darwin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47747 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-29 02:01:34 +00:00
Andrew Lenharth
63b8c1f6f1 Make llvm-ar behave like ar, if you create an empty archive, ar creates an empty archive. llvm-ar would not generate an output file in this case
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47733 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-28 22:24:48 +00:00
Nick Kledzik
ef194ed740 fixes from review of first commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47695 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-27 22:25:36 +00:00
Nick Kledzik
cfd72797b5 use PROJ_SRC_DIR so this builds with Apple style builds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47694 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-27 22:23:46 +00:00
Nick Kledzik
77595fc356 first commit of new LTO system. It is not hooked up in the llvm/tools/Makefile, so no one will build it be default yet
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47621 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-26 20:26:43 +00:00
Bill Wendling
584c3bf650 Detabify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47596 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-26 10:46:10 +00:00
Dale Johannesen
22c3979fca Split ParameterAttributes.h, putting the complicated
stuff into ParamAttrsList.h.  Per feedback from
ParamAttrs changes.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47504 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-22 22:17:59 +00:00
Devang Patel
ef00f9d377 Add -disable-output option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47422 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-21 01:41:25 +00:00
Anton Korobeynikov
44a2a79f18 Get rid of hash_map in llvmc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47374 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-20 11:28:26 +00:00
Anton Korobeynikov
a27694d7aa And final pack of warnings silencing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47372 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-20 11:27:04 +00:00
Anton Korobeynikov
ae9f3a3b7c Unbreak build with gcc 4.3: provide missed includes and silence most annoying warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47367 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-20 11:08:44 +00:00
Dale Johannesen
0d51e7ec0d Expand ParameterAttributes to 32 bits (in preparation
for adding alignment info, not there yet).  Clean up
interfaces to reference ParameterAttributes consistently.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47342 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-19 21:38:47 +00:00
Dan Gohman
39564499c4 Fix a missing space in the description of the find-bugs option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47271 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-18 17:15:45 +00:00
Nick Lewycky
1d1ef14248 PR2027, Fix bugpoint's -find-bugs option, clean up the code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47105 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-14 05:01:46 +00:00
Devang Patel
5252ae6eca Begin setting features for target based on target triple string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46863 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-07 22:32:50 +00:00
Devang Patel
0e50128099 Do not set time out, lets assume assembler will do its job in reasonable amount of time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46718 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-04 21:16:10 +00:00
Devang Patel
bc9ed593d7 Do not strip symbols when EH is ON.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46657 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-02 01:32:38 +00:00
Devang Patel
59c8d8ae89 Supply appropriate arch info to darwin assembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46567 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30 19:19:31 +00:00
Devang Patel
21b70b237d Enable exception handling if it is supported.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46560 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30 17:43:03 +00:00
Chris Lattner
3992f5231a Add support for frameworks. Patch by Shantonu Sen!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46421 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-27 22:58:59 +00:00
Devang Patel
5e563c3264 - Introduces versioning macro LLVM_LTO_VERSION
- Communicate symbol visibility
- Communicate code generation model


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46033 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-15 23:52:34 +00:00
Chris Lattner
03a1c7ae3d Fix llvm-ld -Xlinker, patch by Daniel Teske!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45770 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-09 01:01:17 +00:00
Chris Lattner
4a6a6f21f3 Fix PR1797
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45736 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-08 04:26:20 +00:00
Chris Lattner
234d529e58 remove attribution from a variety of miscellaneous files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45425 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 22:59:10 +00:00
Chris Lattner
cf78659a82 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45424 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 20:47:37 +00:00
Chris Lattner
4c06e0d8a5 remove attributions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45423 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 20:46:15 +00:00
Chris Lattner
21c62da287 remove attributions from tools.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45421 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 20:44:31 +00:00
Chris Lattner
5116784826 remove attributions from tools/utils makefiles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45414 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 20:07:17 +00:00
Gordon Henriksen
194c90ed2a Fixing several transforms which would drop the collector attribute
when copying functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45356 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-25 22:16:06 +00:00
Seo Sanghyeon
dc32d19c1c Actually parse q operation in llvm-ar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45353 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-25 13:53:47 +00:00
Devang Patel
fe085f3fde Revert my previous check-in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45249 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-20 01:46:01 +00:00
Devang Patel
e3611871cb Add lto version check mechanism.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45238 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-20 00:24:01 +00:00
Christopher Lamb
4374f8e208 regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45085 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-17 01:17:35 +00:00
Christopher Lamb
43ad6b3e0d Change the PointerType api for creating pointer types. The old functionality of PointerType::get() has become PointerType::getUnqual(), which returns a pointer in the generic address space. The new prototype of PointerType::get() requires both a type and an address space.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45082 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-17 01:12:55 +00:00
Christopher Lamb
fe63fb986d Implement address space attribute for LLVM pointer types. Address spaces are
regions of memory that have a target specific relationship, as described in the 
Embedded C Technical Report. 

This also implements the 2007-12-11-AddressSpaces test, 
which demonstrates how address space attributes can be used in LLVM IR.

In addition, this patch changes the bitcode signature for stores (in a backwards 
compatible manner), such that the pointer type, rather than the pointee type, is 
encoded. This permits type information in the pointer (e.g. address space) to be 
preserved for stores.

LangRef updates are forthcoming.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44858 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-11 08:59:05 +00:00
Chris Lattner
b25a0934cc Fix accidental commit by Bill.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44729 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-09 00:27:38 +00:00
Bill Wendling
041b3f8356 Reverting 44702. It wasn't correct to rename them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44727 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-08 23:58:46 +00:00
Duncan Sands
a3355ffb3d Rather than having special rules like "intrinsics cannot
throw exceptions", just mark intrinsics with the nounwind
attribute.  Likewise, mark intrinsics as readnone/readonly
and get rid of special aliasing logic (which didn't use
anything more than this anyway).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44544 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-03 20:06:50 +00:00
Duncan Sands
757d243167 Add a convenience method for modifying parameter
attributes.  While there, I noticed that not all
attribute methods returned a pointer-to-constant,
so I fixed that.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44457 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-30 18:19:18 +00:00
Duncan Sands
afa3b6da11 Add some convenience methods for querying attributes, and
use them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44403 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-28 17:07:01 +00:00
Ted Kremenek
f248f0db12 Added quotes around $(NM_PATH) argument to GenLibDeps.pl script so that
the "-p" option is actually seen by nm (it was being dropped as it was
considered as separate argument to the Perl script).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44365 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-27 17:53:54 +00:00
Duncan Sands
dc024674ff Fix PR1146: parameter attributes are longer part of
the function type, instead they belong to functions
and function calls.  This is an updated and slightly
corrected version of Reid Spencer's original patch.
The only known problem is that auto-upgrading of
bitcode files doesn't seem to work properly (see
test/Bitcode/AutoUpgradeIntrinsics.ll).  Hopefully
a bitcode guru (who might that be? :) ) will fix it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44359 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-27 13:23:08 +00:00
Nick Lewycky
6fa98b1320 Allow the block extractor take to take a list of basic blocks to not extract
from a file containing Function/BasicBlock pairings. This is not safe against
anonymous or abnormally-named Funcs or BBs.

Make bugpoint use this interface to pass the BBs list to the child bugpoint.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44101 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-14 06:47:06 +00:00
Chris Lattner
120119da13 Make llvm2cpp better, patch for PR1794, contributed by Zack Rusin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44051 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-13 18:22:33 +00:00
Gordon Henriksen
4e1be6d5ea Deleting redundant copy of block extractor pass. See also PR1775.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43694 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-05 01:54:05 +00:00
Chris Lattner
4a444c717d Fix PR1739.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43286 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-24 04:35:54 +00:00
Chris Lattner
706a5e6124 add a 'don't use me' marker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43226 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-22 19:41:46 +00:00
Gordon Henriksen
4b2b9402c5 Switching TargetMachineRegistry to use the new generic Registry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43094 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-17 21:28:48 +00:00
Dan Gohman
82f209e421 Fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43016 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-15 21:10:03 +00:00
Dan Gohman
82a13c9c48 Move the space in overview output for commands out of each of the
commands and into the common code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42752 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-08 15:45:12 +00:00
Dale Johannesen
4292d1c02a minor long double related changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42439 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-28 18:06:58 +00:00
Dale Johannesen
9d5f456077 Revise previous patch per review comments.
Next round of x87 long double stuff.
Getting close now, basically works.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41875 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-12 03:30:33 +00:00
Dale Johannesen
3f6eb7419d Add APInt interfaces to APFloat (allows directly
access to bits).  Use them in place of float and
double interfaces where appropriate.
First bits of x86 long double constants handling 
(untested, probably does not work).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41858 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-11 18:32:33 +00:00
Owen Anderson
d06eb2c879 Turn GVN on by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41787 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-08 22:23:52 +00:00
Dale Johannesen
cdd509aecd Apply feedback from previous patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41774 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-07 21:07:57 +00:00