Commit Graph

59 Commits

Author SHA1 Message Date
Chandler Carruth
0b8c9a80f2 Move all of the header files which are involved in modelling the LLVM IR
into their new header subdirectory: include/llvm/IR. This matches the
directory structure of lib, and begins to correct a long standing point
of file layout clutter in LLVM.

There are still more header files to move here, but I wanted to handle
them in separate commits to make tracking what files make sense at each
layer easier.

The only really questionable files here are the target intrinsic
tablegen files. But that's a battle I'd rather not fight today.

I've updated both CMake and Makefile build systems (I think, and my
tests think, but I may have missed something).

I've also re-sorted the includes throughout the project. I'll be
committing updates to Clang, DragonEgg, and Polly momentarily.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171366 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-02 11:36:10 +00:00
Chandler Carruth
d04a8d4b33 Use the new script to sort the includes of every file under lib.
Sooooo many of these had incorrect or strange main module includes.
I have manually inspected all of these, and fixed the main module
include to be the nearest plausible thing I could find. If you own or
care about any of these source files, I encourage you to take some time
and check that these edits were sensible. I can't have broken anything
(I strictly added headers, and reordered them, never removed), but they
may not be the headers you'd really like to identify as containing the
API being implemented.

Many forward declarations and missing includes were added to a header
files to allow them to parse cleanly when included first. The main
module rule does in fact have its merits. =]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169131 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-03 16:50:05 +00:00
Bill Wendling
aa5abe88d6 [unwind removal] We no longer have 'unwind' instructions being generated, so
remove the code that handles them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149901 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-06 21:16:41 +00:00
Jay Foad
3ecfc861b4 Remove PHINode::reserveOperandSpace(). Instead, add a parameter to
PHINode::Create() giving the (known or expected) number of operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128537 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-30 11:28:46 +00:00
Jay Foad
d8b4fb4aab (Almost) always call reserveOperandSpace() on newly created PHINodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128535 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-30 11:19:20 +00:00
Owen Anderson
ce665bd2e2 Now with fewer extraneous semicolons!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115996 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-07 22:25:06 +00:00
Dan Gohman
60493c3f4f Eliminate PromoteMemoryToRegisterID; just use addPreserved("mem2reg")
instead, as an example of what this looks like.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110478 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-06 21:48:06 +00:00
Owen Anderson
d13db2c59c Fix batch of converting RegisterPass<> to INTIALIZE_PASS().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109045 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-21 22:09:45 +00:00
Benjamin Kramer
f012705c7e Avoid going through the LLVMContext for type equality where it's safe to dereference the type pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92726 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 13:12:22 +00:00
Owen Anderson
1d0be15f89 Push LLVMContexts through the IntegerType APIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78948 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 21:58:54 +00:00
Dan Gohman
d68a07650c Tidy up #includes, deleting a bunch of unnecessary #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61715 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 17:59:02 +00:00
Dan Gohman
fc74abfba5 Enable first-class aggregates support.
Remove the GetResultInst instruction. It is still accepted in LLVM assembly
and bitcode, where it is now auto-upgraded to ExtractValueInst. Also, remove
support for return instructions with multiple values. These are auto-upgraded
to use InsertValueInst instructions.

The IRBuilder still accepts multiple-value returns, and auto-upgrades them
to InsertValueInst instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53941 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-23 00:34:11 +00:00
Dan Gohman
84b7df43fb Remove uses of llvm/System/IncludeFile.h that are no longer needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50695 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 01:32:53 +00:00
Devang Patel
34437f35e9 Fix insert point handling for multiple return values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49367 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-08 02:24:08 +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
Devang Patel
7498f90926 simplify
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48160 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-10 18:11:41 +00:00
Devang Patel
c5eb380b60 Handle 'ret' with multiple values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47965 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-05 21:50:24 +00:00
Devang Patel
4d519457d1 Skip functions that return multiple values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47924 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-05 00:36:59 +00:00
Chris Lattner
75542bd56b remove the LowerSelect pass. The last client was the old Sparc backend, which is long dead by now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47323 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-19 07:49:17 +00:00
Chris Lattner
4ee451de36 Remove attribution from file headers, per discussion on llvmdev.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45418 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 20:36:04 +00:00
Devang Patel
1997473cf7 Drop 'const'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36662 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-03 01:11:54 +00:00
Devang Patel
3e15bf33e0 Use 'static const char' instead of 'static const int'.
Due to darwin gcc bug, one version of darwin linker coalesces
static const int, which defauts PassID based pass identification.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36652 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-02 21:39:20 +00:00
Devang Patel
794fd75c67 Do not use typeinfo to identify pass in pass manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36632 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-01 21:15:47 +00:00
Chris Lattner
7f8897f22e eliminate RegisterOpt. It does the same thing as RegisterPass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29925 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-27 22:42:52 +00:00
Chris Lattner
191b0ba97e Force anything that #includes llvm/Transforms/Utils/UnifyFunctionExitNodes.h
to link in the implementation.  Thanks to Anton Korobeynikov for figuring out
what was going on here.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28660 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 18:40:06 +00:00
Chris Lattner
8d89e7bdbc Patch to make some xforms preserve each other. Patch contributed by
Domagoj Babic!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28181 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-09 04:13:41 +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
Chris Lattner
ec7c1ab1da Add support for unreachable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17056 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-16 18:21:33 +00:00
Alkis Evlogimenos
eb62bc77b6 Merge i*.h headers into Instructions.h as part of bug403.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15325 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-29 12:17:34 +00:00
Alkis Evlogimenos
99c58f4910 Use one destination constructor for the unconditional branch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13792 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-26 21:38:14 +00:00
Chris Lattner
108e4ab159 Minor cleanups and simplifications
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10127 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-21 16:52:05 +00:00
Chris Lattner
f8485c6434 Start using the nicer terminator auto-insertion API
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10111 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-20 18:25:24 +00:00
Brian Gaeke
d0fde30ce8 Put all LLVM code into the llvm namespace, as per bug 109.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 22:41:34 +00:00
John Criswell
b576c94c15 Added LLVM project notice to the top of every C++ source file.
Header files will be on the way.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9298 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 19:43:21 +00:00
Chris Lattner
f46057be77 Expand the pass to unify all of the unwind blocks as well
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8456 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-10 20:34:51 +00:00
Chris Lattner
de579f11ff Remove using declarations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6306 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-22 22:00:07 +00:00
Chris Lattner
6c0e0496dc * We now preserve the no-critical-edge pass (because we cannot insert critical edges)
* Small modification to be more efficient


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5757 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-31 17:30:25 +00:00
Chris Lattner
1a7db9be56 Fix bug I introduced with one of my previous changes.
Thanks fly out to Nick for noticing it!  :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3691 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-12 19:00:43 +00:00
Chris Lattner
8606d9924b Fix bugs in previous checkins
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3673 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-10 23:31:28 +00:00
Chris Lattner
228b14b71e Fix minor problems in previous checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3668 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-10 22:52:49 +00:00
Chris Lattner
f2d2d0bb13 Clean up code due to auto-insert constructors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3666 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-10 22:38:49 +00:00
Chris Lattner
546b027b3e - Do not expose ::ID from any of the analyses anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3417 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-21 17:09:49 +00:00
Chris Lattner
97f51a3024 * Standardize how analysis results/passes as printed with the print() virtual
methods
* Eliminate AnalysisID:  Now it is just a typedef for const PassInfo*
* Simplify how AnalysisID's are initialized
* Eliminate Analysis/Writer.cpp/.h: incorporate printing functionality into
  the analyses themselves.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3115 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-27 01:12:15 +00:00
Chris Lattner
1e43516dcf * Add support for different "PassType's"
* Add new RegisterOpt/RegisterAnalysis templates for registering passes that
  are to show up in opt or analyze
* Register Analyses now
* Change optimizations to use RegisterOpt instead of RegisterPass
* Add support for different "PassType's"
* Add new RegisterOpt/RegisterAnalysis templates for registering passes that
  are to show up in opt or analyze
* Register Analyses now
* Change optimizations to use RegisterOpt instead of RegisterPass
* Remove getPassName implementations from various subclasses


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3112 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-26 21:12:44 +00:00
Chris Lattner
f629309f74 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3016 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-23 18:06:35 +00:00
Chris Lattner
18961504fc *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2777 91177308-0d34-0410-b5e6-96231b3b80d8
2002-06-25 16:12:52 +00:00
Chris Lattner
8ca21c245c Give the unified exit node a name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2550 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-07 22:14:45 +00:00
Chris Lattner
fc514f40a6 Move UnifyFunctionExitNodes to Utils library: final resting place this time
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2531 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-07 19:18:48 +00:00
Chris Lattner
b444a1fff4 Cleanup implementation a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2526 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-07 18:51:25 +00:00
Chris Lattner
c8cc4cb03b Updates to move some header files out of include/llvm/Transforms into
the Scalar and Utils subdirectories


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2523 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-07 18:36:35 +00:00