1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
Commit Graph

477 Commits

Author SHA1 Message Date
Owen Anderson
881d928f9b Move types back to the 2.5 API.
llvm-svn: 77516
2009-07-29 22:17:13 +00:00
Owen Anderson
0ce2151b36 Move ConstantExpr to 2.5 API.
llvm-svn: 77494
2009-07-29 18:55:55 +00:00
Daniel Dunbar
8496064116 More migration to raw_ostream, the water has dried up around the iostream hole.
- Some clients which used DOUT have moved to DEBUG. We are deprecating the
   "magic" DOUT behavior which avoided calling printing functions when the
   statement was disabled. In addition to being unnecessary magic, it had the
   downside of leaving code in -Asserts builds, and of hiding potentially
   unnecessary computations.

llvm-svn: 77019
2009-07-25 00:23:56 +00:00
Owen Anderson
cc33e89571 Revert the ConstantInt constructors back to their 2.5 forms where possible, thanks to contexts-on-types. More to come.
llvm-svn: 77011
2009-07-24 23:12:02 +00:00
Owen Anderson
cc287b28c9 Get rid of the Pass+Context magic.
llvm-svn: 76702
2009-07-22 00:24:57 +00:00
Owen Anderson
4483fbda5e Revert yesterday's change by removing the LLVMContext parameter to AllocaInst and MallocInst.
llvm-svn: 75863
2009-07-15 23:53:25 +00:00
Owen Anderson
8c85061ee6 Move EVER MORE stuff over to LLVMContext.
llvm-svn: 75703
2009-07-14 23:09:55 +00:00
Torok Edwin
f955a6ef49 llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.
This adds location info for all llvm_unreachable calls (which is a macro now) in
!NDEBUG builds.
In NDEBUG builds location info and the message is off (it only prints
"UREACHABLE executed").

llvm-svn: 75640
2009-07-14 16:55:14 +00:00
Torok Edwin
ae8a3ff177 assert(0) -> LLVM_UNREACHABLE.
Make llvm_unreachable take an optional string, thus moving the cerr<< out of
line.
LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for
NDEBUG builds.

llvm-svn: 75379
2009-07-11 20:10:48 +00:00
Owen Anderson
49226b1075 This started as a small change, I swear. Unfortunately, lots of things call the [I|F]CmpInst constructors. Who knew!?
llvm-svn: 75200
2009-07-09 23:48:35 +00:00
Owen Anderson
332aae685b Switch GlobalVariable ctors to a sane API, where *either* a context or a module is required.
llvm-svn: 75025
2009-07-08 19:03:57 +00:00
Owen Anderson
7a1f69e433 Push LLVMContext through GlobalVariables and IRBuilder.
llvm-svn: 74985
2009-07-08 01:26:06 +00:00
Owen Anderson
121f736d9c "LLVMContext* " --> "LLVMContext *"
llvm-svn: 74878
2009-07-06 23:00:19 +00:00
Owen Anderson
ad3229d281 Thread LLVMContext through the constant folding APIs, which touches a lot of files.
llvm-svn: 74844
2009-07-06 18:42:36 +00:00
Dan Gohman
2e737ac21f Support vector casts in more places, fixing a variety of assertion
failures.

To support this, add some utility functions to Type to help support
vector/scalar-independent code. Change ConstantInt::get and
ConstantFP::get to support vector types, and add an overload to
ConstantInt::get that uses a static IntegerType type, for
convenience.

Introduce a new getConstant method for ScalarEvolution, to simplify
common use cases.

llvm-svn: 73431
2009-06-15 22:12:54 +00:00
Misha Brukman
71c7e40966 Removed trailing whitespace from Makefiles.
llvm-svn: 61991
2009-01-09 16:44:42 +00:00
Dan Gohman
a480933bbd Use Function::getEntryBlock() instead of Function::front(), for clarity.
llvm-svn: 57870
2008-10-21 03:10:28 +00:00
Oscar Fuentes
0f25988689 Initial support for the CMake build system.
llvm-svn: 56419
2008-09-22 01:08:49 +00:00
Dan Gohman
e1f9be27bc Tidy up several unbeseeming casts from pointer to intptr_t.
llvm-svn: 55779
2008-09-04 17:05:41 +00:00
Dan Gohman
1238bf634b Trim #includes.
llvm-svn: 54350
2008-08-05 15:32:23 +00:00
Dan Gohman
8b6f4366ae Tidy up BasicBlock::getFirstNonPHI, and change a bunch of places to
use it instead of duplicating its functionality.

llvm-svn: 51499
2008-05-23 21:05:58 +00:00
Gabor Greif
d61f20217a API change for {BinaryOperator|CmpInst|CastInst}::create*() --> Create. Legacy interfaces will be in place for some time. (Merge from use-diet branch.)
llvm-svn: 51200
2008-05-16 19:29:10 +00:00
Gabor Greif
48ffb6c7dc Fix a bunch of 80col violations that arose from the Create API change. Tweak makefile targets to find these better.
llvm-svn: 51143
2008-05-15 10:04:30 +00:00
Dan Gohman
bab18cae46 Clean up the use of static and anonymous namespaces. This turned up
several things that were neither in an anonymous namespace nor static
but not intended to be global.

llvm-svn: 51017
2008-05-13 00:00:25 +00:00
Dan Gohman
d4a670284c Make several variable declarations static.
llvm-svn: 50696
2008-05-06 01:53:16 +00:00
Duncan Sands
64f15131d8 Use Intrinsic::getDeclaration in more places.
llvm-svn: 49338
2008-04-07 13:45:04 +00:00
Gabor Greif
6c6b8a57f3 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.

llvm-svn: 49277
2008-04-06 20:25:17 +00:00
Gabor Greif
d746841e93 fix typos
llvm-svn: 47994
2008-03-06 10:36:00 +00:00
Chris Lattner
ad9a6ccb83 Remove attribution from file headers, per discussion on llvmdev.
llvm-svn: 45418
2007-12-29 20:36:04 +00:00
Chris Lattner
8193d4af33 remove attribution from lib Makefiles.
llvm-svn: 45415
2007-12-29 20:09:26 +00:00
Christopher Lamb
a608afb52e 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.
llvm-svn: 45082
2007-12-17 01:12:55 +00:00
Chris Lattner
295507d238 Fix for edge profiling, patch by 'Marc' for PR1857
llvm-svn: 44965
2007-12-13 00:04:46 +00:00
Gordon Henriksen
609997aa7d More fleshing out of docs/Passes.html, plus some typo fixes and
improved wording in source files.

llvm-svn: 43377
2007-10-26 03:03:51 +00:00
David Greene
f06a395bb9 New CallInst interface to address GLIBCXX_DEBUG errors caused by
indexing an empty std::vector.

Updates to all clients.

llvm-svn: 40660
2007-08-01 03:43:44 +00:00
Nick Lewycky
c2306ff5b4 Fix typo in comment.
llvm-svn: 36873
2007-05-06 13:37:16 +00:00
Devang Patel
cd45427a87 Drop 'const'
llvm-svn: 36662
2007-05-03 01:11:54 +00:00
Devang Patel
8ee9065162 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.

llvm-svn: 36652
2007-05-02 21:39:20 +00:00
Lauro Ramos Venancio
57d03e112b Fix build error.
llvm-svn: 36648
2007-05-02 20:37:47 +00:00
Devang Patel
38a66bc82e Do not use typeinfo to identify pass in pass manager.
llvm-svn: 36632
2007-05-01 21:15:47 +00:00
Chris Lattner
d503b61318 remove use of BasicBlock::getNext
llvm-svn: 36202
2007-04-17 17:54:12 +00:00
Chris Lattner
e5d747e0be eliminate use of Instruction::getNext()
llvm-svn: 36200
2007-04-17 17:51:03 +00:00
Anton Korobeynikov
f3e62a428a Removed tabs everywhere except autogenerated & external files. Add make
target for tabs checking.

llvm-svn: 36146
2007-04-16 18:10:23 +00:00
Chris Lattner
bfbeedf462 remove reoptimizer-specific passes
llvm-svn: 34439
2007-02-20 05:31:49 +00:00
Chris Lattner
b83d08ddc2 eliminate use of deprecated apis
llvm-svn: 34417
2007-02-19 07:34:47 +00:00
Chris Lattner
ce2cc6e404 Eliminate use of ctors that take vectors.
llvm-svn: 34219
2007-02-13 02:10:56 +00:00
Reid Spencer
8749d297f5 Apply the VISIBILITY_HIDDEN field to the remaining anonymous classes in
the Transforms library. This reduces debug library size by 132 KB, debug
binary size by 376 KB, and reduces link time for llvm tools slightly.

llvm-svn: 33939
2007-02-05 23:32:05 +00:00
Reid Spencer
83803ddedb For PR411:
Adjust to changes in Module interface:
getMainFunction() -> getFunction("main")
getNamedFunction(X) -> getFunction(X)

llvm-svn: 33922
2007-02-05 21:19:13 +00:00
Reid Spencer
310b497b59 For PR1163:
Make the Module's dependent library use a std::vector instead of SetVector
adjust #includes in .cpp files because SetVector.h is no longer included.

llvm-svn: 33855
2007-02-04 00:40:42 +00:00
Reid Spencer
19af04a142 For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoid
confusion with external linkage types.

llvm-svn: 33663
2007-01-30 20:08:39 +00:00
Reid Spencer
3d986f6487 Implement review feedback for the ConstantBool->ConstantInt merge. Chris
recommended that getBoolValue be replaced with getZExtValue and that
get(bool) be replaced by get(const Type*, uint64_t). This implements
those changes.

llvm-svn: 33110
2007-01-12 04:24:46 +00:00
Zhou Sheng
23d24526b2 For PR1043:
Merge ConstantIntegral and ConstantBool into ConstantInt.
Remove ConstantIntegral and ConstantBool from LLVM.

llvm-svn: 33073
2007-01-11 12:24:14 +00:00
Chris Lattner
cd53253271 this pass is unused
llvm-svn: 32998
2007-01-07 18:12:43 +00:00
Chris Lattner
a966510e59 relax some types
llvm-svn: 32982
2007-01-07 07:22:20 +00:00
Reid Spencer
0fb7fa82d4 For PR950:
This patch replaces signed integer types with signless ones:
1. [US]Byte -> Int8
2. [U]Short -> Int16
3. [U]Int   -> Int32
4. [U]Long  -> Int64.
5. Removal of isSigned, isUnsigned, getSignedVersion, getUnsignedVersion
   and other methods related to signedness. In a few places this warranted
   identifying the signedness information from other sources.

llvm-svn: 32785
2006-12-31 05:48:39 +00:00
Reid Spencer
4428c3483b For PR950:
This patch removes the SetCC instructions and replaces them with the ICmp
and FCmp instructions. The SetCondInst instruction has been removed and
been replaced with ICmpInst and FCmpInst.

llvm-svn: 32751
2006-12-23 06:05:41 +00:00
Reid Spencer
7f2fd86692 Remove isSigned calls via foreknowledge of main's argument types.
llvm-svn: 32730
2006-12-21 07:49:49 +00:00
Chris Lattner
a4ef9d3263 remove dead statistic
llvm-svn: 32695
2006-12-19 22:23:21 +00:00
Reid Spencer
f6bd59ba81 Convert the last uses of CastInst::createInferredCast to a normal cast
creation. These changes are still temporary but at least this pushes
knowledge of signedness out closer to where it can be determined properly
and allows signedness to be removed from VMCore.

llvm-svn: 32654
2006-12-18 08:47:13 +00:00
Reid Spencer
50702907eb Replace CastInst::createInferredCast calls with more accurate cast
creation calls.

llvm-svn: 32521
2006-12-13 00:50:17 +00:00
Bill Wendling
a3246c4272 Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, are
now cerr, cout, and NullStream resp.

llvm-svn: 32298
2006-12-07 01:30:32 +00:00
Chris Lattner
a531ce882e Detemplatize the Statistic class. The only type it is instantiated with
is 'unsigned'.

llvm-svn: 32279
2006-12-06 17:46:33 +00:00
Reid Spencer
992d9788b3 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.

llvm-svn: 31931
2006-11-27 01:05:10 +00:00
Bill Wendling
f2fadcee85 Removed #include <iostream> and used the llvm_cerr/DOUT streams instead.
llvm-svn: 31922
2006-11-26 09:17:06 +00:00
Reid Spencer
4bafa71dc1 For PR786:
Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting
fall out by removing unused variables. Remaining warnings have to do with
unused functions (I didn't want to delete code without review) and unused
variables in generated code. Maintainers should clean up the remaining
issues when they see them. All changes pass DejaGnu tests and Olden.

llvm-svn: 31380
2006-11-02 20:25:50 +00:00
Reid Spencer
d414793dbc For PR950:
This patch implements the first increment for the Signless Types feature.
All changes pertain to removing the ConstantSInt and ConstantUInt classes
in favor of just using ConstantInt.

llvm-svn: 31063
2006-10-20 07:07:24 +00:00
Chris Lattner
8a59e8be23 simplify AnalysisGroup registration, eliminating one typeid call.
llvm-svn: 29932
2006-08-28 00:42:29 +00:00
Chris Lattner
a39dcb5377 eliminate RegisterOpt. It does the same thing as RegisterPass.
llvm-svn: 29925
2006-08-27 22:42:52 +00:00
Chris Lattner
f604017e47 Patches to make the LLVM sources more -pedantic clean. Patch provided
by Anton Korobeynikov!  This is a step towards closing PR786.

llvm-svn: 28447
2006-05-24 17:04:05 +00:00
Chris Lattner
adff158fbd Add explicit #includes of <iostream>
llvm-svn: 25509
2006-01-22 22:53:01 +00:00
Andrew Lenharth
1ffbe58972 a few more comments on the interfaces and functions
llvm-svn: 24500
2005-11-28 18:10:59 +00:00
Andrew Lenharth
cad1d52b64 Added documented rsprofiler interface. Also remove new profiler passes, the
old ones have been updated to implement the interface.

llvm-svn: 24499
2005-11-28 18:00:38 +00:00
Jeff Cohen
b171dee053 Fix VC++ warning.
llvm-svn: 24496
2005-11-28 06:45:57 +00:00
Andrew Lenharth
311ec68cf4 Random sampling (aka Arnold and Ryder) profiling. This is still preliminary, but it works on spec on x86 and alpha. The idea is to allow profiling passes to remember what profiling they inserted, then a random sampling framework is inserted which consists of duplicated basic blocks (without profiling), such that at each backedge in the program and entry into every function, the framework chooses whether to use the instrumented code or the instrumentation free code. The goal of such a framework is to make it reasonably cheap to do random sampling of very expensive profiling products (such as load-value profiling).
The code is organized into 3 parts (2 passes)
1) a linked set of profiling passes, which implement an analysis group (linked, like alias analysis are).  These insert profiling into the program, and remember what they inserted, so that at a later time they can be queried about any instruction.

2) a pass that handles inserting the random sampling framework.  This also has options to control how random samples are choosen.  Currently implemented are Global counters, register allocated global counters, and read cycle counter (see? there was a reason for it).

The profiling passes are almost identical to the existing ones (block, function, and null profiling is supported right now), and they are valid passes without the sampling framework (hence the existing passes can be unified with the new ones, not done yet).

Some things are a bit ugly still, but that should be fixed up soon enough.

Other todo? making the counter values not "magic 2^16 -1" values, but dynamically choosable.

llvm-svn: 24493
2005-11-28 00:58:09 +00:00
Chris Lattner
949f205c4c Remove some beta code that no longer has an owner.
llvm-svn: 23944
2005-10-24 02:32:41 +00:00
Chris Lattner
79a1a2af13 Do not build the ProfilePaths directory anymore
llvm-svn: 23943
2005-10-24 02:31:49 +00:00
Chris Lattner
e6f7a38925 DONT_BUILD_RELINKED is gone and implied by BUILD_ARCHIVE now
llvm-svn: 23940
2005-10-24 02:26:13 +00:00
Chris Lattner
a4b13acd52 Only build .a file versions of these libraries, instead of .a and .o versions.
This should speed up build times.

llvm-svn: 23933
2005-10-24 01:59:48 +00:00
Jeff Cohen
a38c737e85 When a function takes a variable number of pointer arguments, with a zero
pointer marking the end of the list, the zero *must* be cast to the pointer
type.  An un-cast zero is a 32-bit int, and at least on x86_64, gcc will
not extend the zero to 64 bits, thus allowing the upper 32 bits to be
random junk.

The new END_WITH_NULL macro may be used to annotate a such a function
so that GCC (version 4 or newer) will detect the use of un-casted zero
at compile time.

llvm-svn: 23888
2005-10-23 04:37:20 +00:00
Jeff Cohen
6c42217055 Eliminate tabs and trailing spaces
llvm-svn: 21480
2005-04-23 21:38:35 +00:00
Misha Brukman
53e199440e Remove trailing whitespace
llvm-svn: 21427
2005-04-21 23:48:37 +00:00
Chris Lattner
4b688a1c70 This mega patch converts us from using Function::a{iterator|begin|end} to
using Function::arg_{iterator|begin|end}.  Likewise Module::g* -> Module::global_*.

This patch is contributed by Gabor Greif, thanks!

llvm-svn: 20597
2005-03-15 04:54:21 +00:00
Alkis Evlogimenos
eb6bfe9cee Add a dependency to the trace library so that it gets pulled in
automatically.

llvm-svn: 19828
2005-01-25 16:23:57 +00:00
Misha Brukman
22df7f894f Convert tabs to spaces
llvm-svn: 19320
2005-01-07 07:05:34 +00:00
Jeff Cohen
c07c54f5b4 Add missing createXxxPass functions
llvm-svn: 19319
2005-01-07 06:57:28 +00:00
Jeff Cohen
79dc6715bb Add missing include
llvm-svn: 19315
2005-01-07 05:42:13 +00:00
Jeff Cohen
a8574e28a3 Add missing include
llvm-svn: 19305
2005-01-06 05:46:44 +00:00
Brian Gaeke
ca2d45f5c1 Fix link error in PPC optimized build of 'opt'.
llvm-svn: 18913
2004-12-13 21:28:39 +00:00
Chris Lattner
8ecbc96420 Add support for compilers without argument dependent name lookup, contributed
by Bjørn Wennberg

llvm-svn: 18627
2004-12-08 16:12:20 +00:00
Chris Lattner
2f52add966 Remove unneeded class qualifier, contributed by Bjørn Wennberg
llvm-svn: 18625
2004-12-08 16:05:02 +00:00
Chris Lattner
a973b1a1a4 CPR is dead.
llvm-svn: 17992
2004-11-19 16:24:57 +00:00
Chris Lattner
b5ff07e46e Remove dead vars
llvm-svn: 17482
2004-11-05 04:46:22 +00:00
Reid Spencer
d3f7233495 Change Library Names Not To Conflict With Others When Installed
llvm-svn: 17286
2004-10-27 23:18:45 +00:00
Reid Spencer
e48ba34fd4 We won't use automake
llvm-svn: 17155
2004-10-22 03:35:04 +00:00
Brian Gaeke
71ff3efdd5 Explain what this pass does.
llvm-svn: 17146
2004-10-20 19:38:58 +00:00
Reid Spencer
ce514b1c2c Initial automake generated Makefile template
llvm-svn: 17136
2004-10-18 23:55:41 +00:00
Reid Spencer
2b5cfe8be8 Correction to allow compilation with Visual C++.
Patch contributed by Morten Ofstad. Thanks Morten!

llvm-svn: 17123
2004-10-18 14:38:48 +00:00
Reid Spencer
e6418ec30f Update to reflect changes in Makefile rules.
llvm-svn: 16950
2004-10-13 11:46:52 +00:00
Reid Spencer
1b7459b29d Initial version of automake Makefile.am file.
llvm-svn: 16893
2004-10-10 22:20:40 +00:00
Brian Gaeke
ab7dd80200 Add accessor function.
llvm-svn: 16622
2004-09-30 20:14:29 +00:00
Brian Gaeke
65540b3e58 Correct type of accessor functions.
llvm-svn: 16621
2004-09-30 20:14:18 +00:00
Brian Gaeke
90a286872c Namespacify. Add accessor function.
llvm-svn: 16620
2004-09-30 20:14:07 +00:00
Chris Lattner
43c0372c0b 'Pass' should now not be derived from by clients. Instead, they should derive
from ModulePass.  Instead of implementing Pass::run, then should implement
ModulePass::runOnModule.

llvm-svn: 16436
2004-09-20 04:48:05 +00:00
Reid Spencer
c4abcbefb1 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/.

llvm-svn: 16137
2004-09-01 22:55:40 +00:00
Misha Brukman
58104df77b Fix #includes of i*.h => Instructions.h as per PR403.
llvm-svn: 15334
2004-07-29 17:30:56 +00:00
Brian Gaeke
f18cdca667 These files don't need to include <iostream> since they include "Support/Debug.h".
llvm-svn: 15089
2004-07-21 20:50:33 +00:00
Reid Spencer
7f33869f9b bug 122:
- Replace ConstantPointerRef usage with GlobalValue usage

llvm-svn: 14953
2004-07-18 00:44:37 +00:00
Reid Spencer
50ec3f9325 Add #include <iostream> since Value.h does not #include it any more.
llvm-svn: 14622
2004-07-04 12:19:56 +00:00
Vikram S. Adve
5ad9c7dd34 Restoring this file.
llvm-svn: 14478
2004-06-29 14:20:27 +00:00
Vikram S. Adve
be2d02dd92 This file is unused, and duplicates functionality in TraceValues.cpp.
llvm-svn: 14369
2004-06-24 20:16:22 +00:00
Brian Gaeke
68eb7345df Expand head-of-file comment.
llvm-svn: 13982
2004-06-03 05:03:02 +00:00
Brian Gaeke
56ae0e9023 Use new form of unconditional branch constructor.
llvm-svn: 13930
2004-06-01 20:06:10 +00:00
Brian Gaeke
b41b628afd Clean up this pass somewhat:
Add better comments, including a better head-of-file comment.
Prune #includes.
Fix a FIXME that Chris put here by using doInitialization().
Use DEBUG() to print out debug msgs.
Give names to basic blocks inserted by this pass.
Expand tabs.
Use InsertProfilingInitCall() from ProfilingUtils to insert the initialize call.

llvm-svn: 13581
2004-05-14 21:21:52 +00:00
Brian Gaeke
a5b32230db Fix typo
llvm-svn: 13340
2004-05-03 23:52:07 +00:00
Brian Gaeke
dcfc3c580e In InsertProfilingInitCall(), make it legal to pass in a null array, in
which case you'll get a null array and zero passed to the profiling function.

llvm-svn: 13336
2004-05-03 22:06:33 +00:00
Brian Gaeke
c8cd0e9092 Add initial implementation of basic-block tracing instrumentation pass.
llvm-svn: 13335
2004-05-03 22:06:32 +00:00
Chris Lattner
9236135e8f Support getelementptr instructions which use uint's to index into structure
types and can have arbitrary 32- and 64-bit integer types indexing into
sequential types.

llvm-svn: 12653
2004-04-05 01:30:19 +00:00
Brian Gaeke
59c80cfd05 Start cleaning up this pass so that I can debug it.
llvm-svn: 12548
2004-03-30 19:53:46 +00:00
Chris Lattner
01062fb636 Initial support for edge profiling
llvm-svn: 12225
2004-03-08 17:54:34 +00:00
Chris Lattner
d40842737b Split utility functions out of BlockProfiling.cpp
llvm-svn: 12224
2004-03-08 17:06:13 +00:00
Chris Lattner
41c4dc98a7 finegrainify namespacification
llvm-svn: 12221
2004-03-08 16:45:53 +00:00
Chris Lattner
52cc69f39e Remove dependence on return type of ConstantStruct::get
llvm-svn: 11466
2004-02-15 04:07:32 +00:00
Chris Lattner
3fd2b573f1 Remove dependence on the return type of ConstantArray::get
llvm-svn: 11463
2004-02-15 04:05:58 +00:00
Chris Lattner
d2c679e5f6 initialization calls now return argc. If the program uses the argc value
passed into main, make sure they use the return value of the init call
instead of the one passed in.

llvm-svn: 11262
2004-02-10 17:41:01 +00:00
Chris Lattner
031bd7e9f3 Finegrainify namespacification
llvm-svn: 10727
2004-01-09 06:12:26 +00:00
Chris Lattner
feeb3261f2 Start using the nicer terminator auto-insertion API
llvm-svn: 10111
2003-11-20 18:25:24 +00:00
Brian Gaeke
d25f86d683 Put all LLVM code into the llvm namespace, as per bug 109.
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
Chris Lattner
f7a909f914 Be gcc 3.4 clean
llvm-svn: 9725
2003-11-05 06:12:18 +00:00
Chris Lattner
7c5cf380af Refactor code, initial implementation of -insert-block-profiling pass
llvm-svn: 9593
2003-10-29 21:24:22 +00:00
Chris Lattner
19e529f0e3 Pass in argc & argv
llvm-svn: 9563
2003-10-28 22:42:24 +00:00
Chris Lattner
7e6b286041 Initial checkin of profiling instrumentation pass. So far, despite the
file name, we only support function profiling.  This will be fixed in the
near future.

llvm-svn: 9547
2003-10-28 18:59:04 +00:00
Chris Lattner
51c13a0c9a Eliminate using declarations
llvm-svn: 9543
2003-10-27 21:44:09 +00:00
John Criswell
de34542f41 Added LLVM copyright header.
llvm-svn: 9321
2003-10-21 15:17:13 +00:00
John Criswell
71d2894956 Added LLVM copyright notice to Makefiles.
llvm-svn: 9312
2003-10-20 22:26:57 +00:00
John Criswell
b402729b30 Added LLVM project notice to the top of every C++ source file.
Header files will be on the way.

llvm-svn: 9298
2003-10-20 19:43:21 +00:00
Chris Lattner
87843f87b8 Change the Opcode enum for PHI nodes from "Instruction::PHINode" to "Instruction::PHI" to be more consistent with the other instructions.
llvm-svn: 9269
2003-10-19 21:34:28 +00:00
Chris Lattner
b6c8569f05 Regularize header file comments
llvm-svn: 9071
2003-10-13 03:32:08 +00:00
Chris Lattner
1c989f6d65 Regularize header file comment, eliminate using's
llvm-svn: 9069
2003-10-13 03:30:47 +00:00
Brian Gaeke
e5249bf429 Include <cstdio> instead of <stdio.h>.
llvm-svn: 9032
2003-10-10 18:46:52 +00:00
Brian Gaeke
a3f850a182 Don't include Config/stdio.h or <stdio.h>.
llvm-svn: 9031
2003-10-10 18:46:29 +00:00
Misha Brukman
868eac95dd Fix spelling.
llvm-svn: 9027
2003-10-10 17:57:28 +00:00
Misha Brukman
339d9fb58d Fixing the spelling of this filename.
llvm-svn: 9009
2003-10-10 16:57:31 +00:00
Chris Lattner
a72fa3ea50 Use global *_iterator
llvm-svn: 8703
2003-09-24 22:07:33 +00:00
Chris Lattner
feb17a5fbf Do not use BasicBlock::*_iterator, just use *_iterator itself.
Isn't updating copy and pasted code a joy

llvm-svn: 8702
2003-09-24 22:06:25 +00:00
Chris Lattner
d4de2760aa Rename Function::getEntryNode -> getEntryBlock
llvm-svn: 8625
2003-09-20 14:39:18 +00:00
Chris Lattner
0d124f6067 Update for new UnifyFunction... API
Remove using decl

llvm-svn: 8458
2003-09-10 20:35:33 +00:00
Chris Lattner
3e9d3081fc Remove #include
llvm-svn: 8457
2003-09-10 20:35:21 +00:00
Brian Gaeke
5d6ee8cf02 Correct comments
Don't include InstLoops.h
Don't export factory functions for these passes

llvm-svn: 8373
2003-09-05 19:43:19 +00:00
Chris Lattner
8378e59323 Use the new interface, simplifies code
NOTE that these two files are _BUGGY_ and need to be fixed, just not by me  :)

llvm-svn: 8241
2003-08-31 00:21:59 +00:00
Chris Lattner
fa80983a82 Use the new interface, simplifies code
Delete a bunch of commented out code

llvm-svn: 8240
2003-08-31 00:21:05 +00:00
Chris Lattner
ad1253a44f Use the new interface, simplifies code
llvm-svn: 8239
2003-08-31 00:20:36 +00:00
Brian Gaeke
9aa6b2db94 Give std::map<BasicBlock *, BasicBlock *> the short name BBMap, because
it's used 7 different times.
Rename `getBackEdges' to `findAndInstrumentBackEdges', for clarity.
Remove some excess whitespace and commented-out code.
Use shorter forms of CallInst ctors.
Do not make `reopt_threshold' visible to the LLVM program, and do not
 pass it to the call to `reoptimizerInitialize'.  Don't pass the
 GlobalVariable representing it to any of our helper methods.
 `reopt_threshold' is an internal parameter of the reoptimizer, which
 InstLoops does not need to know about.

llvm-svn: 7794
2003-08-12 22:00:24 +00:00
Chris Lattner
686e94e760 DEBUG got moved to Support/Debug.h
llvm-svn: 7492
2003-08-01 22:15:03 +00:00
Anand Shukla
d02a20b947 Added check for inlinable function
llvm-svn: 7206
2003-07-18 20:55:26 +00:00
Anand Shukla
bb730173d6 A pass to combine multiple backedges that go to same target
llvm-svn: 7201
2003-07-18 16:08:32 +00:00
Vikram S. Adve
f5914c9bca Trace loads and stores as they happen (stores were being
remembered in valuesStoredInFunction, but never traced at function return,
and that's too late to be finding the error anyway).
Stores trace both the value and the address being stored to,
but after some experience I think only values should be traced.
The pointer hash table just fills up far too quickly if every
store address were traced.

llvm-svn: 7169
2003-07-11 21:57:43 +00:00
Anand Shukla
cb78ec5ada Added functionality to instrmentation pass
llvm-svn: 7161
2003-07-10 21:55:57 +00:00
John Criswell
258dfc0319 Merged in autoconf branch. This provides configuration via the autoconf
system.

llvm-svn: 7014
2003-06-30 21:59:07 +00:00
Anand Shukla
80e3f54082 Fixed a bug so initialization code is always inserted in main
llvm-svn: 6622
2003-06-05 06:02:46 +00:00
Chris Lattner
b7423ab729 Use a constant expr GEP instead of an actual instruction
llvm-svn: 6620
2003-06-05 04:48:18 +00:00
Chris Lattner
3c98c8953a Make this work with counter > 127
llvm-svn: 6613
2003-06-04 20:08:47 +00:00
Anand Shukla
6939133e23 Added the #(internal functions) to output
llvm-svn: 6502
2003-06-01 02:40:49 +00:00
Chris Lattner
e58f6153f4 Remove using declarations
llvm-svn: 6306
2003-05-22 22:00:07 +00:00
Chris Lattner
db6b7ba364 Remove unnecesary &*'s
llvm-svn: 5872
2003-04-23 16:37:45 +00:00
Chris Lattner
fa4f750f3e Add new linkage types to support a real frontend
llvm-svn: 5786
2003-04-16 20:28:45 +00:00
Chris Lattner
fc93e77390 Make help message more clear
llvm-svn: 5775
2003-04-13 03:50:14 +00:00
Anand Shukla
7aae29d426 Changes to runtime framework
llvm-svn: 5572
2003-02-14 20:41:53 +00:00
Chris Lattner
644b87ddb2 Revert Anand's patch which broke the build
llvm-svn: 5525
2003-02-10 15:55:50 +00:00
Anand Shukla
a502e67a14 *** empty log message ***
llvm-svn: 5522
2003-02-09 21:15:36 +00:00
Chris Lattner
9cb223ad0d Rename include/llvm/Transforms/Instrumentation/TraceFunctions.h to Instrumentation.h
llvm-svn: 5281
2003-01-14 22:39:29 +00:00
Chris Lattner
1b6292ad6f Fix typeo
llvm-svn: 5278
2003-01-14 22:34:36 +00:00
Chris Lattner
b5580841b3 Remove unused header and function
llvm-svn: 5277
2003-01-14 22:34:13 +00:00
Chris Lattner
a61f16fc93 Clean up #includes
Move graph.h into local directory

llvm-svn: 5276
2003-01-14 22:33:56 +00:00
Chris Lattner
5fb6540457 Make sure to handle %'s in strings correctly so that the names of BB's and functions are actually printed!
llvm-svn: 5234
2003-01-13 00:52:14 +00:00
Chris Lattner
0141841bc4 Fix warning
llvm-svn: 4649
2002-11-09 00:49:43 +00:00
Anand Shukla
bf2fc13a2f code to lightly instrument at branches
llvm-svn: 4511
2002-11-03 01:45:20 +00:00
Chris Lattner
b565d3ac5b - Rename AnalysisUsage::preservesAll to getPreservesAll & preservesCFG to
setPreservesCFG to be less confusing.

llvm-svn: 4255
2002-10-21 20:00:28 +00:00
Chris Lattner
79cf8950f1 * Apparently string::find doesn't work right on our sun boxes. Work around this.
llvm-svn: 4219
2002-10-17 16:22:08 +00:00
Chris Lattner
fdf2ca9468 - Rename Instruction::First*Op to *OpsBegin, and Num*Ops to *OpsEnd to
reflect the fact that it's a range being defined.

llvm-svn: 4147
2002-10-13 19:39:16 +00:00
Anand Shukla
d80a46cb42 Changed to external global var
llvm-svn: 4120
2002-10-12 20:33:47 +00:00
Chris Lattner
3fec0954e8 Changes to work with Statistics rework
* Renamed StatisticReporter.h/cpp to Statistic.h/cpp
    * Broke constructor to take two const char * arguments instead of one, so
      that indendation can be taken care of automatically.
    * Sort the list by pass name when printing
    * Make sure to print all statistics as a group, instead of randomly when
      the statistics dtors are called.
    * Updated ProgrammersManual with new semantics.

llvm-svn: 4004
2002-10-01 22:40:31 +00:00
Chris Lattner
4cc183889f Updates to work with recent Statistic's changes:
* Renamed StatisticReporter.h/cpp to Statistic.h/cpp
    * Broke constructor to take two const char * arguments instead of one, so
      that indendation can be taken care of automatically.
    * Sort the list by pass name when printing
    * Make sure to print all statistics as a group, instead of randomly when
      the statistics dtors are called.
    * Updated ProgrammersManual with new semantics.

llvm-svn: 4001
2002-10-01 22:38:37 +00:00
Chris Lattner
b5d3e33496 Build subdirs in parallel
llvm-svn: 4000
2002-10-01 22:36:35 +00:00
Anand Shukla
b959e8559e Added checking threshold
llvm-svn: 3864
2002-09-20 16:44:35 +00:00
Anand Shukla
cf6e76fbff split retracing into a separate file
llvm-svn: 3809
2002-09-18 03:55:26 +00:00
Misha Brukman
e093f5cb9b Removed unnecessary #includes.
llvm-svn: 3802
2002-09-18 02:07:57 +00:00
Chris Lattner
4396aee3a2 There is a #define in some header that conflicts with INFINITY, rename it.
llvm-svn: 3797
2002-09-17 23:46:33 +00:00
Anand Shukla
86e49b7621 Incorporated changes in alloca and getElementPointer instruction
llvm-svn: 3733
2002-09-16 05:26:51 +00:00
Anand Shukla
0906acb26d Incorporated changes in alloca instruction
llvm-svn: 3732
2002-09-16 05:24:49 +00:00
Chris Lattner
56d9dfd0e0 Fix bug I introduced
llvm-svn: 3719
2002-09-14 19:33:16 +00:00
Chris Lattner
18e3c4ff50 - Change getelementptr instruction to use long indexes instead of uint
indexes for sequential types.

llvm-svn: 3681
2002-09-11 01:21:29 +00:00
Chris Lattner
da9702a8a1 Simplify code (somtimes dramatically), by using the new "auto-insert" feature
of instruction constructors.

llvm-svn: 3656
2002-09-10 17:04:02 +00:00
Chris Lattner
5758cf6d77 Simplify code (somtimes dramatically), by using the new "auto-insert" feature
of instruction constructors.

llvm-svn: 3655
2002-09-10 17:03:06 +00:00
Chris Lattner
904f214a13 - Renamed Type::isIntegral() to Type::isInteger()
- Added new method Type::isIntegral() that is the same as isInteger, but
    also accepts bool.

llvm-svn: 3573
2002-09-03 01:07:35 +00:00
Chris Lattner
65920fff34 *** empty log message ***
llvm-svn: 3483
2002-08-22 22:48:32 +00:00
Chris Lattner
9c09c6a306 Do not generate loads/stores with indexing
llvm-svn: 3422
2002-08-21 22:11:33 +00:00
Chris Lattner
c3bf7eea0e Remove extraneous #includes
llvm-svn: 3421
2002-08-21 22:11:14 +00:00
Chris Lattner
91d4742562 - Cleaned up the interface to AnalysisUsage to take analysis class names
instead of ::ID's.
 - Pass::getAnalysis<> now no longer takes an optional argument

llvm-svn: 3264
2002-08-08 19:01:28 +00:00
Chris Lattner
7a9eb848cd * 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

llvm-svn: 3113
2002-07-26 21:12:46 +00:00
Chris Lattner
b934722f1b * 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

llvm-svn: 3112
2002-07-26 21:12:44 +00:00
Chris Lattner
c482880f9e *** empty log message ***
llvm-svn: 3016
2002-07-23 18:06:35 +00:00
Chris Lattner
17d972ce72 * Cleanup the pass a bit more, making it more object oriented.
* Split the two behaviors of the InsertTraceCode class into two subclasses
* Register Passes

llvm-svn: 3014
2002-07-23 18:04:15 +00:00
Chris Lattner
24bcbdd155 *** empty log message ***
llvm-svn: 3002
2002-07-23 17:52:38 +00:00
Chris Lattner
4d05cb01b1 Hide extra argument
llvm-svn: 2986
2002-07-22 02:17:27 +00:00
Chris Lattner
99ad379582 *** empty log message ***
llvm-svn: 2985
2002-07-22 02:10:13 +00:00
Anand Shukla
60f4c16199 comeented out debug printing
llvm-svn: 2980
2002-07-21 09:41:18 +00:00
Anand Shukla
4c822342bf minor corrections
llvm-svn: 2971
2002-07-18 20:56:47 +00:00
Chris Lattner
d842f9ff2d Anand forgot to check in the makefile corresponding to his previous change
which eliminated the EmitFunctions directory

llvm-svn: 2937
2002-07-17 17:13:01 +00:00
Anand Shukla
4bb7a17266 Moved over EmitFunctions to this library
llvm-svn: 2928
2002-07-16 18:58:08 +00:00
Anand Shukla
4da4e0ba0a removed this directory
llvm-svn: 2927
2002-07-16 18:56:29 +00:00
Anand Shukla
03970aa8bf Moved EmitFunctions.cpp up to instrumentation directory
llvm-svn: 2926
2002-07-16 18:55:55 +00:00
Chris Lattner
0be1cc0f00 * Cleanup pass
* The global variable cannot be internal or else we cannot use it!
* Always add a function to the table, even if it only has a single basic
  block.

llvm-svn: 2921
2002-07-16 17:42:54 +00:00
Anand Shukla
a10f139779 Added EmitFunctions directory
llvm-svn: 2883
2002-07-12 20:12:07 +00:00
Anand Shukla
d4dae682bc Initial makefile
llvm-svn: 2882
2002-07-12 20:11:24 +00:00
Anand Shukla
edba9ad8a9 Initial version: adds a function table to output code
llvm-svn: 2881
2002-07-12 20:10:50 +00:00
Vikram S. Adve
c98bc8cd5e Fix iteration and InsertPos bugs introduced when Chris changed over to ilist.
llvm-svn: 2840
2002-07-08 23:37:07 +00:00
Anand Shukla
43bbde3f76 changes BBsorting and oredering
llvm-svn: 2817
2002-07-08 19:37:06 +00:00
Anand Shukla
9d38b4b511 small corrections
llvm-svn: 2816
2002-07-08 19:36:39 +00:00
Anand Shukla
a5c08b7973 changed function numbering
llvm-svn: 2815
2002-07-08 19:36:01 +00:00
Anand Shukla
25f890e009 additions and bug fixes
llvm-svn: 2794
2002-06-25 21:14:58 +00:00
Chris Lattner
dfd421a7df MEGAPATCH checkin.
For details, See: docs/2002-06-25-MegaPatchInfo.txt

llvm-svn: 2779
2002-06-25 16:13:24 +00:00
Chris Lattner
d7cbd7d5d2 MEGAPATCH checkin.
For details, See: docs/2002-06-25-MegaPatchInfo.txt

llvm-svn: 2778
2002-06-25 16:13:21 +00:00
Anand Shukla
92dcd43312 Relocating Graph.h
llvm-svn: 2770
2002-06-25 14:28:55 +00:00
Chris Lattner
76bf940554 Convert code to use the DEBUG macro so that debug code can simply be
enabled with the -debug command line option.

llvm-svn: 2721
2002-05-22 21:56:32 +00:00
Chris Lattner
c7e2f5bbd7 * Change commandline options a bit to be nicer
* Insert accurate prototypes for functions
* Insert casts to use accurate prototypes

llvm-svn: 2677
2002-05-20 21:43:59 +00:00
Vikram S. Adve
c0db1765f4 Hash pointer values to a sequence number to get identical results from
lli and llc.  This is controlled with options -tracehash on|off.

Also, added an option to specify which functions should be traced.
Particularly useful to reduce output volume in basic-block tracing.

llvm-svn: 2646
2002-05-19 15:39:02 +00:00
Chris Lattner
f7806b0212 Move UnifyFunctionExitNodes to Utils library: final resting place this time
llvm-svn: 2531
2002-05-07 19:18:48 +00:00
Chris Lattner
9e1c79995e Updates to move some header files out of include/llvm/Transforms into
the Scalar and Utils subdirectories

llvm-svn: 2523
2002-05-07 18:36:35 +00:00
Chris Lattner
96e0c48175 Eliminate duplicate or unneccesary #include's
llvm-svn: 2397
2002-04-29 17:42:12 +00:00
Chris Lattner
589debc4ba Add new optional getPassName() virtual function that a Pass can override
to make debugging output a lot nicer.

llvm-svn: 2395
2002-04-29 14:57:45 +00:00
Chris Lattner
ec70d92221 Tighten up the AnalysisUsage of lots of passes, primarily to correctly indicate whether or not they invalidate the CFGA
llvm-svn: 2386
2002-04-28 21:27:06 +00:00
Chris Lattner
321a8cf4ba Split ConstantVals.h into Constant.h and Constants.h
llvm-svn: 2378
2002-04-28 19:55:58 +00:00
Chris Lattner
2f0ee1833d s/Method/Function
llvm-svn: 2336
2002-04-27 07:27:19 +00:00
Chris Lattner
536cf1b13f * Rename MethodPass class to FunctionPass
- Rename runOnMethod to runOnFunction
* Transform getAnalysisUsageInfo into getAnalysisUsage
  - Method is now const
  - It now takes one AnalysisUsage object to fill in instead of 3 vectors
    to fill in
  - Pass's now specify which other passes they _preserve_ not which ones
    they modify (be conservative!)
  - A pass can specify that it preserves all analyses (because it never
    modifies the underlying program)
* s/Method/Function/g in other random places as well

llvm-svn: 2333
2002-04-27 06:56:12 +00:00
Chris Lattner
2e20403fad * s/Method/Function
* Fix bug where the character after a % was being discarded

llvm-svn: 2248
2002-04-14 06:15:24 +00:00
Chris Lattner
5e12c7caf5 Move FunctionArgument out of iOther.h into Argument.h and rename class to
be 'Argument' instead of FunctionArgument.

llvm-svn: 2216
2002-04-09 19:48:49 +00:00
Chris Lattner
7ae20d642d Add #includes to make up for #includes pruned out of header files.
llvm-svn: 2207
2002-04-09 18:37:46 +00:00
Chris Lattner
31e5838296 s/Method/Function
Remove extraneous #includes of llvm/Assembly/Writer

llvm-svn: 2178
2002-04-08 22:03:00 +00:00
Chris Lattner
bc15ae64dd Change references to the Method class to be references to the Function
class.  The Method class is obsolete (renamed) and all references to it
are being converted over to Function.

llvm-svn: 2144
2002-04-07 20:49:59 +00:00
Chris Lattner
8afff0c29a s/MethodType/FunctionType
llvm-svn: 2115
2002-04-04 22:19:18 +00:00
Chris Lattner
a2d3c99dfc Simplify code a bit by using Module::getOrInsertFunction
llvm-svn: 2032
2002-03-29 03:43:24 +00:00
Chris Lattner
849c762b02 Change references from Method to Function
change references from MethodARgument to FunctionArgument

llvm-svn: 1991
2002-03-26 18:01:55 +00:00
Chris Lattner
c481e92886 Rename Method to Function
llvm-svn: 1957
2002-03-23 22:51:58 +00:00
Vikram S. Adve
308f672ac8 Just a comment.
llvm-svn: 1908
2002-03-18 03:40:25 +00:00
Chris Lattner
e2383e8592 Change over to use new style pass mechanism, now passes only expose small
creation functions in their public header file, unless they can help it.

llvm-svn: 1816
2002-02-26 21:46:54 +00:00
Chris Lattner
1b9b843452 Move ProfilePaths class into ProfilePaths library, only expose a creation function
llvm-svn: 1812
2002-02-26 20:04:59 +00:00
Chris Lattner
6693158d06 Pass stuff by reference instead of by copy. Copying entire graphs seems like
a bad idea

llvm-svn: 1810
2002-02-26 19:49:45 +00:00
Chris Lattner
6145c5df9d Move processGraph down lower in the file so all of the forward declarations
can be eliminated.

llvm-svn: 1809
2002-02-26 19:43:49 +00:00
Chris Lattner
12573def64 * Changes to compile successfully with GCC 3.0
* Eliminated memory leak in processGraph
* Pass vectors by const reference to moveDummyCode instead of by copy

llvm-svn: 1808
2002-02-26 19:40:28 +00:00
Anand Shukla
3644255181 Makefile for profile-paths
llvm-svn: 1807
2002-02-26 19:36:43 +00:00
Anand Shukla
b9e67e748a Initial checkin: functions on Graph used for path profile pass
llvm-svn: 1806
2002-02-26 19:02:16 +00:00