Commit Graph

321 Commits

Author SHA1 Message Date
Rafael Espindola
fbb2c7adc2 The exception demo needs its symbols exported.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180622 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-26 19:07:40 +00:00
Dmitri Gribenko
a6f10317bf Update links to "Itanium C++ ABI: Exception Handling" document
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172356 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-13 15:53:09 +00:00
Chandler Carruth
0a08460599 Update the examples for the new header file locations.
Sorry for the fallout here, I forgot the examples aren't built by
default any more.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171371 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-02 11:56:33 +00:00
Chandler Carruth
4ca7e09b7c Sort the #include lines of the examples/... tree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169249 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-04 10:16:57 +00:00
Rafael Espindola
250ab62a62 Fix gcc's -Wunused-but-set-variable warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168576 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-26 00:56:44 +00:00
Micah Villmow
b8bce928f4 Back out r166591, not sure why this made it through since I cancelled the command. Bleh, sorry about this!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166596 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-24 17:25:11 +00:00
Micah Villmow
2f87640b86 Delete a directory that wasn't supposed to be checked in yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166591 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-24 17:20:04 +00:00
Quentin Colombet
92b0d8cf2c Test commit access
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166481 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-23 16:03:18 +00:00
NAKAMURA Takumi
4c856ee1f8 ExceptionDemo.cpp: Use Function::setDoesNotReturn(). Attributes stuff was updated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165796 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-12 14:11:48 +00:00
NAKAMURA Takumi
9f469a0ca3 ExceptionDemo.cpp: Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165795 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-12 14:11:43 +00:00
Micah Villmow
2b4b44e0d2 Move TargetData to DataLayout.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165401 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-08 16:37:04 +00:00
Chandler Carruth
06cb8ed006 Move llvm/Support/IRBuilder.h -> llvm/IRBuilder.h
This was always part of the VMCore library out of necessity -- it deals
entirely in the IR. The .cpp file in fact was already part of the VMCore
library. This is just a mechanical move.

I've tried to go through and re-apply the coding standard's preferred
header sort, but at 40-ish files, I may have gotten some wrong. Please
let me know if so.

I'll be committing the corresponding updates to Clang and Polly, and
Duncan has DragonEgg.

Thanks to Bill and Eric for giving the green light for this bit of cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159421 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-29 12:38:19 +00:00
Arnaud A. de Grandmaison
5791df830d Remove trailing whitespaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158943 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-21 22:26:01 +00:00
Benjamin Kramer
d9b0b02561 Fix typos found by http://github.com/lyda/misspell-check
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157885 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-02 10:20:22 +00:00
Michael J. Spencer
75338097c7 Remove llvm-ld and llvm-stub (which is only used by llvm-ld).
llvm-ld is no longer useful and causes confusion and so it is being removed.

* Does not work very well on Windows because it must call a gcc like driver to
  assemble and link.
* Has lots of hard coded paths which are wrong on many systems.
* Does not understand most of ld's options.
* Can be partially replaced by llvm-link | opt | {llc | as, llc -filetype=obj} |
  ld, or fully replaced by Clang.

I know of no production use of llvm-ld, and hacking use should be
replaced by Clang's driver.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155147 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-19 19:27:54 +00:00
Chandler Carruth
637f949a7f Switch to a more idiomatic way of silencing unused variable warnings in
release builds. Silences clang's -Wself-assign.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150942 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-20 00:02:49 +00:00
Peter Collingbourne
793a32dfb6 Update ExceptionDemo to use ConstantDataArray.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149867 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-06 14:09:13 +00:00
Bill Wendling
08e8db423d Update to the new EH system...remove OLD EH code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149728 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-04 00:29:12 +00:00
Francois Pichet
a0935775db Fix BrainF compilation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149375 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31 09:35:01 +00:00
Daniel Dunbar
4ab406d7fc LLVMBuild: Remove trailing newline, which irked me.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146409 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-12 19:48:00 +00:00
Peter Collingbourne
d40e103ea5 EngineBuilder: support for custom TargetOptions. Fixes the
ExceptionDemo example.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146108 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-07 23:58:57 +00:00
Daniel Dunbar
a3a2dfd4a2 build: Add initial cut at LLVMBuild.txt files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143634 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-03 18:53:17 +00:00
Garrison Venn
113aa86120 Changed comments on foreign C++ exceptions (generated with type info 7),
handling with references to 
http://sourcery.mentor.com/public/cxx-abi/abi-eh.html (r 1.22).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140695 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28 10:53:56 +00:00
Garrison Venn
9cb5086f2a Modified demo to use 3.0 resume instruction vs calling _Unwine_Resume.
Also conducted some reformatting. As the LLVM coding standard doc does not
seem to touch on how to align function arguments, and format code longer than
80 cols in general, the confusion persists. There is the golden rule, but as
this code has gone through several styles to deal with this, the golden rule
seems to be ignored. The latest reformatting effort tries to match the other
source files as much as possible.

Tested on OS X 10.7.1 with, and without the OLD_EXC_SYSTEM defined. Have NOT
tested on LINUX.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140379 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-23 14:45:10 +00:00
Garrison Venn
85500714c4 Converted Exception demo over to using new 3.0 landingpad instruction. This
was compiled and tested on OS X 10.7.1. It was not tested on LINUX. In 
addition the defined OLD_EXC_SYSTEM was not tested with this version.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140303 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-22 15:45:14 +00:00
Garrison Venn
aae66fad05 This is a hack to get the demo working with the new 3.0 exception
infrastructure. As this makes the demo no longer a demo, and especially not a 
demo on how to use the llvm exception mechanism, this hack will shortly be 
changed to use the new 3.0 exception infrastructure. However for the time being 
this demo is an example on how to use the AutoUpgrade 
UpgradeExceptionHandling(...) function on < 3.0 exception handling code.                          


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140301 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-22 14:07:50 +00:00
Evan Cheng
3e74d6fdd2 Move TargetRegistry and TargetSelect from Target to Support where they belong.
These are strictly utilities for registering targets and components.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138450 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-24 18:08:43 +00:00
Jay Foad
dab3d29605 Convert ConstantExpr::getGetElementPtr and
ConstantExpr::getInBoundsGetElementPtr to use ArrayRef.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135673 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-21 14:31:17 +00:00
Chris Lattner
4b3d5469fb update for recent api changes. I have a hard time believing that this is actually a useful example.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135374 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-18 04:52:58 +00:00
Chris Lattner
77613d4135 update this to build with a recent IRBuilder change and de-constify types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135373 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-18 04:52:09 +00:00
Francois Pichet
0bd9d3af54 Convert CallInst and InvokeInst APIs to use ArrayRef. For the LLVM examples.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135266 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 10:59:52 +00:00
Benjamin Kramer
eb9a85f09e Change Intrinsic::getDeclaration and friends to take an ArrayRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135154 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-14 17:45:39 +00:00
Francois Pichet
e8b323aed4 Remove the const from Type after of Jay deconstify work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135000 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-12 22:04:11 +00:00
Garrison Venn
c0f33cb590 Reverted 134901 because of 134959. Did not use svn merge -r but rather:
1,$s/llvm::Type::getInt\(..\)Ty(builder.getContext())/builder.getInt\1Ty()/g
1,$s/builder.getInt\(..*\)Ty()->getPointerTo()/builder.getInt\1PtrTy()/g

vi sub commands (second one was not a reversion but requested by 
Tobias Grosser.

Mod was tested, but other examples have failed to build as they are currently 
being thrashed with the const qualifier removal change.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134985 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-12 15:34:42 +00:00
Francois Pichet
a3d57e6980 Fix the BrainF build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134975 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-12 08:43:36 +00:00
John Wiegley
d1c2bd8e6e fix some examples
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134933 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-11 22:39:46 +00:00
Garrison Venn
6e6cdd00aa Modified demo to work with non const Type parameters as is required by new
type system. However most of these modifications were due to IRBuilder
(IRBuilderBase), not having been modified to NOT return such const qualified
free types. If IRBuilder does not change, as can also be seen in its 
instruction creation methods, to use const free types, it may be useful to have
ExceptionDemo drop IRBuilder usage. Modifying builder.getInt32Ty() to
llvm::Type::getInt32Ty(builder.getContext()) is pretty ugly.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134901 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-11 16:31:53 +00:00
Johnny Chen
e5dfa8f697 Modify comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132800 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-09 20:11:46 +00:00
Eric Christopher
c3a627de3f Have the JIT tutorial use IRBuilder for the IR.
Patch by Jake Waskett!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132770 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-09 05:58:50 +00:00
Chris Lattner
7a2bdde0a0 Fix a ton of comment typos found by codespell. Patch by
Luis Felipe Strano Moraes!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129558 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-15 05:18:47 +00:00
Garrison Venn
18bba84d77 Added new FIXME note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129360 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-12 12:30:10 +00:00
Eli Friedman
2227f154eb Get rid of useless comment; if a file uses functions from a given header,
it is obvious that it should be included.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129295 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-11 20:16:05 +00:00
Garrison Venn
2a7d4ad1f4 Because some systems have reported that this example would not build the
header file cstdio was added as an include.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129291 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-11 19:52:49 +00:00
Garrison Venn
64cfcefdeb Fixed more best practices, and explicit/implicit style guide issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129245 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-10 14:06:52 +00:00
Chris Lattner
626ab1ccad reindent this whole file and do a variety of stylistic cleanups.
This code is still a long way from following best practices.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129140 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-08 18:02:51 +00:00
Chris Lattner
cad3f77fa8 fix this to build with the recent StructType changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129139 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-08 17:56:47 +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
Erick Tryzelaar
01b4ccb6f7 Fix compiling the ocaml kaleidoscope tutorials
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125202 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-09 18:32:02 +00:00
Oscar Fuentes
af62935bce Do not re-test for the existence of pthread.h.
It was causing problems on the MinGW build. See PR8849.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122518 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-23 21:27:22 +00:00
Dan Gohman
ab7fa0885e Fix missing includes of "llvm/Analysis/Passes.h" in the tutorials. Thanks
for Arnaud Allard de Grandmaison for preparing a patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119351 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 17:28:22 +00:00
Dan Gohman
dfa1a79b0c Update examples and documentation to explicitly add basicaa, now that it's
no longer included by default.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119169 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-15 18:41:10 +00:00
Oscar Fuentes
f0c55a9b97 Build with RTTI and exceptions disabled. Only in GCC for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116682 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-17 02:26:16 +00:00
Duncan Sands
18d52f2fb5 Convert a bunch of uses of 'bytecode' into 'bitcode'. This
is not everything, but the remaining cases are less trivial.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115080 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-29 20:09:55 +00:00
Garrison Venn
161b4c46a3 Removed TracingBrainF from examples Makefile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113970 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-15 14:55:32 +00:00
Michael J. Spencer
3a210e2d30 Revert "CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally."
This reverts commit r113632

Conflicts:

	cmake/modules/AddLLVM.cmake

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113819 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-13 23:59:48 +00:00
Michael J. Spencer
4e9c939312 CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113632 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-10 21:14:25 +00:00
Chris Lattner
03d1063d32 fit in 80 columns and don't crash on exit, fixes PR8080
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113123 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-05 23:09:30 +00:00
Owen Anderson
060bb6bb4a Remove this from the main tree. I'll host it out of tree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112529 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-30 21:34:26 +00:00
Owen Anderson
37b25ab2a9 Add a new example to the LLVM distribution: a trace-based Brainfuck compiler that uses LLVM as its code generator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112465 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-30 07:33:39 +00:00
Mikhail Glushenkov
8f2766df7f Trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111552 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-19 20:03:53 +00:00
Chris Lattner
9908fec11e upgrade to use new intrinsics, patch by Dan Hipschman!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110735 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-10 21:45:38 +00:00
Duncan Sands
3472766f9e Convert some tab stops into spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108130 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-12 08:16:59 +00:00
Eric Christopher
688d58033a Fix up the ocaml kaleidoscope example as well.
Note that the example currently doesn't appear to work.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108121 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-12 02:32:44 +00:00
Chris Lattner
b0e9eada32 fix several bugs in the tutorial, patch by Kevin Kelley!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106498 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-21 22:51:14 +00:00
Daniel Dunbar
f19f6a9deb Remove stray semi-colon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106009 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-15 17:47:24 +00:00
Eric Christopher
2632bbf0de Make kaleidoscope use fp add/sub/mul.
Patch by Patrick Flannery!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105932 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-14 06:03:16 +00:00
Duncan Sands
57b6e9eb6c Remove the -enable-sjlj-eh option, which doesn't do anything.
Remove the -enable-eh option which is only used by the JIT,
and replace it with -jit-enable-eh.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102865 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-02 15:36:26 +00:00
Nick Lewycky
ec42dd6e19 Use provided llvm-defined variables instead of twisting user-controlled knobs.
No visible change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102240 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-24 05:07:24 +00:00
Benjamin Kramer
7c43f4357d Fix -Wcast-qual warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101894 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-20 11:50:37 +00:00
Erick Tryzelaar
d592e1a809 Fix the ocaml kaleidoscope tutorial to fix linking external libraries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99151 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-21 23:15:13 +00:00
Erick Tryzelaar
7129a67228 Don't always run the ocaml kaleidoscope tutorials.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97973 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-08 20:07:32 +00:00
Erick Tryzelaar
49457b8158 Add OCaml tutorial to the examples.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97966 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-08 19:32:27 +00:00
Jeffrey Yasskin
407fbdd161 Roll back r96959 again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96981 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-23 20:53:37 +00:00
Jeffrey Yasskin
ea6c39d417 Roll r96559 forward again, adding libLLVM-2.7svn.so to LLVM. This links 3 of
the examples shared to make sure the shared library keeps working.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96959 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-23 18:10:07 +00:00
Garrison Venn
c80a1f7721 Modified examples Makefile to only build the ExceptionDemo example for
x86 and x86_64 on UNIX systems. Only OS X 10.6.2 (x86_64) and 32bit CentOS 5.2
with gcc 4.1.2 were tested. ARM UNIX build triggered failure motivating this
modification, as it seems that the ARM ABI does not support _Unwind_GetIP(...),
_Unwind_SetGR(...), and _Unwind_SetIP(...). From doing a quick browse of:
http://infocenter.arm.com/help/topic/com.arm.doc.ihi0038a/IHI0038A_ehabi.pdf,
it seems as if all other exception related apis are supported. Looks like
the port can be done to ARM. Thanks to Xerxes Rånby <xerxes@zafena.se> for
pointing out this error.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96949 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-23 16:27:59 +00:00
Jeffrey Yasskin
42fc558624 Make Kaleidoscope not link against the interpreter, since that didn't
work anyway (Interpreter::getPointerToFunction doesn't return a
callable pointer), and improve the error message when an
ExecutionEngine can't be created.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95896 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 19:15:20 +00:00
Garrison Venn
0f08a27617 Prevented build on WINDOWS using default make system. Stopped WINDOWS build
at eh llvm/examples level using if check on LLVM_ON_UNIX.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95763 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-10 03:38:29 +00:00
Garrison Venn
778086caf7 Prevented ExceptionDemo example being built on WINDOWS via if( NOT WIN32 )
check in examples cmake list file. This has NOT been tested.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95761 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-10 02:50:08 +00:00
Garrison Venn
a2c2f1ae84 Adds a JIT based exception handling example to the examples directory.
Both zero cost example domain specific, and C++ foreign exception handling are 
shown. The example's documentation fully explains how to run the example.

Notes:

1)   The code uses an extremely simple type info model.
2)   Only a single landing pad is used per unwind edge 
     (one call to llvm.eh.selector)
3)   llvm.eh.selector support for filter arguments is not given.
4)   llvm.eh.typeid.for is not used.
5)   Forced unwind behavior is not supported.
6)   Very little if any error handling is given.
7)   __attribute__((__aligned__)) is used.
8)   The code uses parts from the llvm compiler-rt project and
     the llvm Kaleidoscope example.
9)   The code has not been ported or tested on WINDOWS.
10)  The code was not tested with a cmake build.
11)  The code was tested for a debug build on 32bit X86 CentOS LINUX, 
     and both a debug and release build on OS X 10.6.2 (64bit).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95723 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 23:22:43 +00:00
Garrison Venn
f9fba3087e Repository access test commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95221 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-03 12:00:02 +00:00
Jeffrey Yasskin
f0356fe140 Kill ModuleProvider and ghost linkage by inverting the relationship between
Modules and ModuleProviders. Because the "ModuleProvider" simply materializes
GlobalValues now, and doesn't provide modules, it's renamed to
"GVMaterializer". Code that used to need a ModuleProvider to materialize
Functions can now materialize the Functions directly. Functions no longer use a
magic linkage to record that they're materializable; they simply ask the
GVMaterializer.

Because the C ABI must never change, we can't remove LLVMModuleProviderRef or
the functions that refer to it. Instead, because Module now exposes the same
functionality ModuleProvider used to, we store a Module* in any
LLVMModuleProviderRef and translate in the wrapper methods.  The bindings to
other languages still use the ModuleProvider concept.  It would probably be
worth some time to update them to follow the C++ more closely, but I don't
intend to do it.

Fixes http://llvm.org/PR5737 and http://llvm.org/PR5735.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94686 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-27 20:34:15 +00:00
Daniel Dunbar
bdf49fc1ed This example requires RTTI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94398 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 00:45:01 +00:00
Chris Lattner
18f0c677fa fix PR5649 by making fib use the JIT instead of the interpreter, patch by Perry Lorier!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90186 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-01 01:56:27 +00:00
Victor Hernandez
9d0b704e3e Re-commit r86077 now that r86290 fixes the 179.art and 175.vpr ARM regressions.
Here is the original commit message:

This commit updates malloc optimizations to operate on malloc calls that have constant int size arguments.

Update CreateMalloc so that its callers specify the size to allocate:
MallocInst-autoupgrade users use non-TargetData-computed allocation sizes.
Optimization uses use TargetData to compute the allocation size.

Now that malloc calls can have constant sizes, update isArrayMallocHelper() to use TargetData to determine the size of the malloced type and the size of malloced arrays.
Extend getMallocType() to support malloc calls that have non-bitcast uses.

Update OptimizeGlobalAddressOfMalloc() to optimize malloc calls that have non-bitcast uses.  The bitcast use of a malloc call has to be treated specially here because the uses of the bitcast need to be replaced and the bitcast needs to be erased (just like the malloc call) for OptimizeGlobalAddressOfMalloc() to work correctly.

Update PerformHeapAllocSRoA() to optimize malloc calls that have non-bitcast uses.  The bitcast use of the malloc is not handled specially here because ReplaceUsesOfMallocWithGlobal replaces through the bitcast use.

Update OptimizeOnceStoredGlobal() to not care about the malloc calls' bitcast use.

Update all globalopt malloc tests to not rely on autoupgraded-MallocInsts, but instead use explicit malloc calls with correct allocation sizes.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86311 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 00:16:28 +00:00
Victor Hernandez
df98761d08 Revert r86077 because it caused crashes in 179.art and 175.vpr on ARM
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86213 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-06 01:33:24 +00:00
Victor Hernandez
24f934d055 Update CreateMalloc so that its callers specify the size to allocate:
MallocInst-autoupgrade users use non-TargetData-computed allocation sizes.
Optimization uses use TargetData to compute the allocation size.

Now that malloc calls can have constant sizes, update isArrayMallocHelper() to use TargetData to determine the size of the malloced type and the size of malloced arrays.
Extend getMallocType() to support malloc calls that have non-bitcast uses.

Update OptimizeGlobalAddressOfMalloc() to optimize malloc calls that have non-bitcast uses.  The bitcast use of a malloc call has to be treated specially here because the uses of the bitcast need to be replaced and the bitcast needs to be erased (just like the malloc call) for OptimizeGlobalAddressOfMalloc() to work correctly.

Update PerformHeapAllocSRoA() to optimize malloc calls that have non-bitcast uses.  The bitcast use of the malloc is not handled specially here because ReplaceUsesOfMallocWithGlobal replaces through the bitcast use.

Update OptimizeOnceStoredGlobal() to not care about the malloc calls' bitcast use.

Update all globalopt malloc tests to not rely on autoupgraded-MallocInsts, but instead use explicit malloc calls with correct allocation sizes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86077 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 00:03:03 +00:00
Victor Hernandez
046e78ce55 Remove FreeInst.
Remove LowerAllocations pass.
Update some more passes to treate free calls just like they were treating FreeInst.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85176 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-26 23:43:48 +00:00
Victor Hernandez
13ad5aaaff Autoupgrade malloc insts to malloc calls.
Update testcases that rely on malloc insts being present.

Also prematurely remove MallocInst handling from IndMemRemoval and RaiseAllocations to help pass tests in this incremental step.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84292 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-17 00:00:19 +00:00
Douglas Gregor
12adce4e1a Make ParallelJIT pthreads linking with CMake slightly less broken
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83820 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-12 04:00:13 +00:00
Victor Hernandez
3e0c99a26f Revert 82694 "Auto-upgrade malloc instructions to malloc calls." because it causes regressions in the nightly tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82784 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-25 18:11:52 +00:00
Victor Hernandez
96b930ddc7 Auto-upgrade malloc instructions to malloc calls.
Reviewed by Devang Patel.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82694 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-24 17:47:49 +00:00
Erick Tryzelaar
31c6c5d58a Add examples for Kaleidoscope chapters 2 through 6.
Conflicts:

	examples/Makefile

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82574 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 21:15:19 +00:00
Erick Tryzelaar
a4eb1a5cba Rename Kaleidoscope to show that it's for Chapter 7 of the tutorial.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82573 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 21:15:00 +00:00
Erick Tryzelaar
fd1ec5e68b Sync c++ kaleidoscope tutorial with test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82572 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 21:14:49 +00:00
Reid Kleckner
60130f0e90 Allocate the module provider in the Kaleidoscope code on the heap, not the stack, so that it can be properly deleted. Also update the tutorial with the new code. This fixes PR4762, hopefully better than the last time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80138 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 20:58:25 +00:00
Dan Gohman
baa26395cc Make LLVM command-line tools overwrite their output files without -f.
This is conventional command-line tool behavior. -f now just means
"enable binary output on terminals".

Add a -f option to llvm-extract and llvm-link, for consistency.

Remove F_Force from raw_fd_ostream and enable overwriting and
truncating by default. Introduce an F_Excl flag to permit users to
enable a failure when the file already exists. This flag is
currently unused.

Update Makefiles and documentation accordingly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79990 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-25 15:34:52 +00:00
Reid Kleckner
9e6f3f2f14 Fixed double free in Kaleidoscope. Fixes PR4762.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79896 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-24 05:42:21 +00:00
Chris Lattner
b515d75856 eliminate the std::ostream forms of the bitcode writing APIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79840 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-23 07:49:08 +00:00
Oscar Fuentes
22624b1d8e CMake: LLVMConfig assigns LLVMX86 to the `native' component
name. Updated LLVM_LINK_COMPONENTS of Kaleidoscope.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79219 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-17 01:41:46 +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
Owen Anderson
a7235ea724 Move a few more APIs back to 2.5 forms. The only remaining ones left to change back are
metadata related, which I'm waiting on to avoid conflicting with Devang.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77721 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 20:28:14 +00:00
Owen Anderson
debcb01b0f Move types back to the 2.5 API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77516 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29 22:17:13 +00:00
Owen Anderson
1fd7096407 Change ConstantArray to 2.5 API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77347 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28 18:32:17 +00:00
Owen Anderson
6f83c9c6ef Move ConstantFP construction back to the 2.5-ish API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77247 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 20:59:43 +00:00
Owen Anderson
eed707b1e6 Revert the ConstantInt constructors back to their 2.5 forms where possible, thanks to contexts-on-types. More to come.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77011 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 23:12:02 +00:00
Owen Anderson
e922c02019 Get rid of the Pass+Context magic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76702 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-22 00:24:57 +00:00
Eli Friedman
8e9b17198a PR4591: Make sure to initialize the pass manager before using it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76422 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 14:50:07 +00:00
Daniel Dunbar
e687151e03 Fix build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76366 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-19 08:27:16 +00:00
Xerxes Ranby
6ce6daae38 Fix: Kaleidoscope link in JIT and Interpreter by including JIT.h and Interpreter.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76363 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-19 08:10:01 +00:00
Reid Kleckner
4b1511b027 Add EngineBuilder to ExecutionEngine in favor of the five optional argument EE::create().
Also a test commit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76276 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 00:42:18 +00:00
Owen Anderson
914e50c841 Privatize the ConstantFP table. I'm on a roll!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76097 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 19:05:41 +00:00
Owen Anderson
001dbfebcb Move the ConstantInt uniquing table into LLVMContextImpl. This exposed a number of issues in
our current context-passing stuff, which is also fixed here


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76089 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 18:04:31 +00:00
Owen Anderson
9adc0abad3 Move EVER MORE stuff over to LLVMContext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75703 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 23:09:55 +00:00
Owen Anderson
0a5372ed3e Begin the painful process of tearing apart the rat'ss nest that is Constants.cpp and ConstantFold.cpp.
This involves temporarily hard wiring some parts to use the global context.  This isn't ideal, but it's
the only way I could figure out to make this process vaguely incremental.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75445 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 04:09:18 +00:00
Owen Anderson
333c400965 This started as a small change, I swear. Unfortunately, lots of things call the [I|F]CmpInst constructors. Who knew!?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75200 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 23:48:35 +00:00
Owen Anderson
d1fbd14294 Push LLVMContext _back_ through IRBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75040 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 20:50:47 +00:00
Owen Anderson
e9b11b4313 Switch GlobalVariable ctors to a sane API, where *either* a context or a module is required.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75025 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 19:03:57 +00:00
Owen Anderson
3d29df3e8a Push LLVMContext through GlobalVariables and IRBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74985 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 01:26:06 +00:00
Owen Anderson
4434ed44c4 Make the use of const with respect to LLVMContext sane. Hopefully this is the last time, for the
moment, that I will need to make far-reaching changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74655 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 23:13:44 +00:00
Owen Anderson
31895e7359 Hold the LLVMContext by reference rather than by pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74640 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 21:22:36 +00:00
Owen Anderson
8b477ed579 Add a pointer to the owning LLVMContext to Module. This requires threading LLVMContext through a lot
of the bitcode reader and ASM parser APIs, as well as supporting it in all of the tools.

Patches for Clang and LLVM-GCC to follow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74614 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 16:58:40 +00:00
Chris Lattner
0fd38069cb improve the APIs for creating struct and function types with no arguments/elements
to not have to create a temporary vector (in the API at least).  Patch by Jay Foad!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74584 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 04:13:31 +00:00
Chris Lattner
da06288aeb make sure that JIT examples link in their appropriate target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73613 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-17 16:48:44 +00:00
Chris Lattner
d25bff6d52 silence a warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69117 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-15 00:16:05 +00:00
Bill Wendling
7126702edf Get rid of some compile warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68978 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-13 19:45:05 +00:00
Nick Lewycky
9f85634bd2 Add Kaleidoscope to examples/ so that it gets built regularly and we'll notice
if an API change causes it to be out of date. The code is copied out of
LangImpl7.html.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68912 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-12 20:47:23 +00:00
Torok Edwin
eb55f3ea3c Another attempt at fixing PR2975.
Types can have references to eachother, so we can't just call destroy on them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68523 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-07 17:23:02 +00:00
Torok Edwin
5ce1b11412 revert r68457, its crashing in make check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68459 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-06 20:57:34 +00:00
Torok Edwin
59d5f83b32 fix (part of) memory leak on shutdown. See PR2975.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68457 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-06 20:49:21 +00:00
Chris Lattner
824b958e6f reapply Sanjiv's patch to genericize memcpy/memset/memmove to take an
arbitrary integer width for the count.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59823 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-21 16:42:48 +00:00
Bill Wendling
dc770929cb Revert r59802. It was breaking the build of llvm-gcc:
g++ -m32 -c -g -DIN_GCC -W -Wall -Wwrite-strings -Wmissing-format-attribute -fno-common -mdynamic-no-pic -DHAVE_CONFIG_H -Wno-unused -DTARGET_NAME=\"i386-apple-darwin9.5.0\" -I. -I. -I../../llvm-gcc.src/gcc -I../../llvm-gcc.src/gcc/. -I../../llvm-gcc.src/gcc/../include -I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include  -I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/include -DENABLE_LLVM -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/../llvm.src/include  -D_DEBUG  -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS   -I. -I. -I../../llvm-gcc.src/gcc -I../../llvm-gcc.src/gcc/. -I../../llvm-gcc.src/gcc/../include -I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include  -I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/include ../../llvm-gcc.src/gcc/llvm-types.cpp -o llvm-types.o
../../llvm-gcc.src/gcc/llvm-convert.cpp: In member function 'void TreeToLLVM::EmitMemCpy(llvm::Value*, llvm::Value*, llvm::Value*, unsigned int)':
../../llvm-gcc.src/gcc/llvm-convert.cpp:1496: error: 'memcpy_i32' is not a member of 'llvm::Intrinsic'
../../llvm-gcc.src/gcc/llvm-convert.cpp:1496: error: 'memcpy_i64' is not a member of 'llvm::Intrinsic'
../../llvm-gcc.src/gcc/llvm-convert.cpp: In member function 'void TreeToLLVM::EmitMemMove(llvm::Value*, llvm::Value*, llvm::Value*, unsigned int)':
../../llvm-gcc.src/gcc/llvm-convert.cpp:1512: error: 'memmove_i32' is not a member of 'llvm::Intrinsic'
../../llvm-gcc.src/gcc/llvm-convert.cpp:1512: error: 'memmove_i64' is not a member of 'llvm::Intrinsic'
../../llvm-gcc.src/gcc/llvm-convert.cpp: In member function 'void TreeToLLVM::EmitMemSet(llvm::Value*, llvm::Value*, llvm::Value*, unsigned int)':
../../llvm-gcc.src/gcc/llvm-convert.cpp:1528: error: 'memset_i32' is not a member of 'llvm::Intrinsic'
../../llvm-gcc.src/gcc/llvm-convert.cpp:1528: error: 'memset_i64' is not a member of 'llvm::Intrinsic'
make[3]: *** [llvm-convert.o] Error 1
make[3]: *** Waiting for unfinished jobs....
rm fsf-funding.pod gcov.pod gfdl.pod cpp.pod gpl.pod gcc.pod
make[2]: *** [all-stage1-gcc] Error 2
make[1]: *** [stage1-bubble] Error 2
make: *** [all] Error 2



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59809 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-21 09:09:41 +00:00
Sanjiv Gupta
219ab405e6 Make mem[cpy,move,set] intrinsics overloaded.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59802 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-21 07:49:09 +00:00
Oscar Fuentes
57bd83be19 CMake: use add_llvm_example for HowToUseJIT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57944 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 02:52:59 +00:00
Oscar Fuentes
dbc2e856fc CMake: Builds all examples. Corrected name of CBackend target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56682 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26 19:48:03 +00:00
Oscar Fuentes
3d01fc7de8 Initial support for the CMake build system.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56419 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-22 01:08:49 +00:00
Chris Lattner
944fac71e0 Switch the asmprinter (.ll) and all the stuff it requires over to
use raw_ostream instead of std::ostream.  Among other goodness,
this speeds up llvm-dis of kc++ with a release build from 0.85s
to 0.49s (88% faster).

Other interesting changes:
 1) This makes Value::print be non-virtual.
 2) AP[S]Int and ConstantRange can no longer print to ostream directly, 
    use raw_ostream instead.
 3) This fixes a bug in raw_os_ostream where it didn't flush itself 
    when destroyed.
 4) This adds a new SDNode::print method, instead of only allowing "dump".


A lot of APIs have both std::ostream and raw_ostream versions, it would
be useful to go through and systematically anihilate the std::ostream 
versions.

This passes dejagnu, but there may be minor fallout, plz let me know if
so and I'll fix it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55263 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-23 22:23:09 +00:00
Chris Lattner
ef5dc366e7 use proper namespace qualifications
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55259 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-23 22:00:15 +00:00
Anton Korobeynikov
c40c8b333d Remove asmprinters from examples by default. This reduces their size by ~5%
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54890 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-17 13:55:33 +00:00
Chris Lattner
fad86b003a Rework the routines that convert AP[S]Int into a string. Now, instead of
returning an std::string by value, it fills in a SmallString/SmallVector
passed in.  This significantly reduces string thrashing in some cases.

More specifically, this:
 - Adds an operator<< and a print method for APInt that allows you to 
   directly send them to an ostream.
 - Reimplements APInt::toString to be much simpler and more efficient
   algorithmically in addition to not thrashing strings quite as much.

This speeds up llvm-dis on kc++ by 7%, and may also slightly speed up the
asmprinter.  This also fixes a bug I introduced into the asmwriter in a
previous patch w.r.t. alias printing.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54873 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-17 07:19:36 +00:00
Eric Christopher
7a61d701c0 Have IRBuilder take a template argument on whether or not to preserve
names. This can save a lot of allocations if you aren't going to be
looking at the output.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54546 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-08 19:39:37 +00:00
Gabor Greif
7cbd8a3e92 API change for {BinaryOperator|CmpInst|CastInst}::create*() --> Create. Legacy interfaces will be in place for some time. (Merge from use-diet branch.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51200 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-16 19:29:10 +00:00
Gabor Greif
b1dbcd886a Fix a bunch of 80col violations that arose from the Create API change. Tweak makefile targets to find these better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51143 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-15 10:04:30 +00:00
Duncan Sands
89f6d88db3 Merge LLVMBuilder and FoldingBuilder, calling
the result IRBuilder.  Patch by Dominic Hamon.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49604 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-13 06:22:09 +00:00
Chris Lattner
7098772436 silence warning when assertions are disabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49371 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-08 05:49:09 +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
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
Chris Lattner
7520fcd7a5 Fix an incorrect comment, PR2147.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48323 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-13 03:29:42 +00:00
Chris Lattner
fc001bbfc3 remove attributions from examples.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45420 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 20:37:57 +00:00
Chris Lattner
57360d1f1c remove attributions from the rest of the llvm makefiles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45416 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 20:11:13 +00:00