History log of /external/llvm/lib/VMCore/Core.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
32811bef956e0fae4329e6515420d85f7e510660 17-Aug-2012 Bill Wendling <isanbard@gmail.com> Change the `linker_private_weak_def_auto' linkage to `linkonce_odr_auto_hide' to
make it more consistent with its intended semantics.

The `linker_private_weak_def_auto' linkage type was meant to automatically hide
globals which never had their addresses taken. It has nothing to do with the
`linker_private' linkage type, which outputs the symbols with a `l' (ell) prefix
among other things.

The intended semantic is more like the `linkonce_odr' linkage type.

Change the name of the linkage type to `linkonce_odr_auto_hide'. And therefore
changing the semantics so that it produces the correct output for the linker.

Note: The old linkage name `linker_private_weak_def_auto' will still parse but
is not a synonym for `linkonce_odr_auto_hide'. This should be removed in 4.0.
<rdar://problem/11754934>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162114 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
ce718ff9f42c7da092eaa01dd0242e8d5ba84713 23-Jun-2012 Hans Wennborg <hans@hanshq.net> Extend the IL for selecting TLS models (PR9788)

This allows the user/front-end to specify a model that is better
than what LLVM would choose by default. For example, a variable
might be declared as

@x = thread_local(initialexec) global i32 42

if it will not be used in a shared library that is dlopen'ed.

If the specified model isn't supported by the target, or if LLVM can
make a better choice, a different model may be used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159077 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
5c87b4958d1a5dabf2400be5b3a86aed4f82db91 09-May-2012 Hans Wennborg <hans@hanshq.net> Introduce llvm-c function LLVMPrintModuleToFile.

This lets you save the textual representation of the LLVM IR to a file.
Before this patch it could only be printed to STDERR from llvm-c.

Patch by Carlo Kok!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156479 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
eabe3ad57d824c2b07016352fd97ce85777b6f9d 22-Mar-2012 Chris Lattner <sabre@nondot.org> add load/store volatility control to the C API, patch by Yiannis Tsiouris!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153238 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
50bee42b54cd9aec5f49566307df2b0cf23afcf6 05-Feb-2012 Craig Topper <craig.topper@gmail.com> Convert assert(0) to llvm_unreachable

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149849 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
18c7f80b3e83ab584bd8572695a3cde8bafd9d3c 05-Feb-2012 Chris Lattner <sabre@nondot.org> reapply the patches reverted in r149470 that reenable ConstantDataArray,
but with a critical fix to the SelectionDAG code that optimizes copies
from strings into immediate stores: the previous code was stopping reading
string data at the first nul. Address this by adding a new argument to
llvm::getConstantStringInfo, preserving the behavior before the patch.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149800 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
91766fe066efe6e0969ba805a2e3726a70ed34a3 01-Feb-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Revert Chris' commits up to r149348 that started causing VMCoreTests unit test to fail.

These are:

r149348
r149351
r149352
r149354
r149356
r149357
r149361
r149362
r149364
r149365

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149470 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
6a89228faca4b30c4abc29b5dec98bdac011ea4c 31-Jan-2012 Chris Lattner <sabre@nondot.org> eliminate the "string" form of ConstantArray::get, using
ConstantDataArray::getString instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149365 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
4d6ccb5f68cd7c6418a209f1fa4dbade569e4493 20-Jan-2012 David Blaikie <dblaikie@gmail.com> More dead code removal (using -Wunreachable-code)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148578 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
164b86b4399559e45fab7846f1e3e09119cab4e2 20-Jan-2012 Kostya Serebryany <kcc@google.com> Extend Attributes to 64 bits

Problem: LLVM needs more function attributes than currently available (32 bits).
One such proposed attribute is "address_safety", which shows that a function is being checked for address safety (by AddressSanitizer, SAFECode, etc).

Solution:
- extend the Attributes from 32 bits to 64-bits
- wrap the object into a class so that unsigned is never erroneously used instead
- change "unsigned" to "Attributes" throughout the code, including one place in clang.
- the class has no "operator uint64 ()", but it has "uint64_t Raw() " to support packing/unpacking.
- the class has "safe operator bool()" to support the common idiom: if (Attributes attr = getAttrs()) useAttrs(attr);
- The CTOR from uint64_t is marked explicit, so I had to add a few explicit CTOR calls
- Add the new attribute "address_safety". Doing it in the same commit to check that attributes beyond first 32 bits actually work.
- Some of the functions from the Attribute namespace are worth moving inside the class, but I'd prefer to have it as a separate commit.

Tested:
"make check" on Linux (32-bit and 64-bit) and Mac (10.6)
built/run spec CPU 2006 on Linux with clang -O2.


This change will break clang build in lib/CodeGen/CGCall.cpp.
The following patch will fix it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148553 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
58bd1510a4fea29b1ea57d6a6c4038eeea0264a2 17-Jan-2012 David Blaikie <dblaikie@gmail.com> Provide better messages in llvm_unreachable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148293 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
fdebc38523b397743973ff6a2d2e93b112dd96e5 17-Jan-2012 David Blaikie <dblaikie@gmail.com> Remove unreachable code. (replace with llvm_unreachable to help GCC where necessary)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148284 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
2dd674fdce68f8fd59d78a3bbab2cf5b8d220290 17-Jan-2012 David Blaikie <dblaikie@gmail.com> Removing unused default switch cases in switches over enums that already account for all enumeration values explicitly.

(This time I believe I've checked all the -Wreturn-type warnings from GCC & added the couple of llvm_unreachables necessary to silence them. If I've missed any, I'll happily fix them as soon as I know about them)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148262 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
2bd335470f8939782f3df7f6180282d3825d4f09 10-Jan-2012 David Blaikie <dblaikie@gmail.com> Remove unnecessary default cases in switches that cover all enum values.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147855 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
45ca049f1f221f5fc1a118f6aab83ac290cb8211 20-Dec-2011 Devang Patel <dpatel@apple.com> Add support to add named metadata operand.
Patch by Andrew Wilkins!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146984 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
ce16339930a2b03e53b4e6399ef59c092a7f2cfa 17-Dec-2011 Dan Gohman <gohman@apple.com> The powers that be have decided that LLVM IR should now support 16-bit
"half precision" floating-point with a first-class type.

This patch adds basic IR support (but not codegen support).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146786 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
6563c879964c3bcf5c77d40da8d4c807adf605aa 14-Oct-2011 Torok Edwin <edwintorok@gmail.com> ocaml bindings: add getopcode for constant and instruction, and int64_of_const.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141990 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
31116410de16f435d8c76c53e3d6b95fa812cd2c 14-Oct-2011 Torok Edwin <edwintorok@gmail.com> bindings: tab and indentation fixes of my previous commits

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141989 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
7761948761d60209a5d5bf2f09a3249ccc0168e6 07-Oct-2011 Matt Beaumont-Gay <matthewbg@google.com> Move default to top of switch

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141366 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
3ef12348d775405a50927a0d7f596710f006c7b6 06-Oct-2011 Matt Beaumont-Gay <matthewbg@google.com> Fix -asserts build

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141313 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
4df1557f4073cd91893a186acfee96bee64b28cc 06-Oct-2011 Torok Edwin <edwintorok@gmail.com> Don't require C bindings opcode numbers to be kept in sync.

They are not in sync now, for example Bitcast would show up as LLVMCall.
So instead introduce 2 functions that map to and from the opcodes in the C
bindings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141290 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
ff12c99d131789ccb9e8739963f4d8e0e95667d4 06-Oct-2011 Torok Edwin <edwintorok@gmail.com> ocaml/C bindings: type->isSized()

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141288 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
4917ec9ec775d7bc7fbc3362b4c576c32b7617f4 06-Oct-2011 Torok Edwin <edwintorok@gmail.com> add binding to read icmp predicate

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141287 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
4f661ab0fb87f97c4a12912249c3c366df882102 06-Oct-2011 Torok Edwin <edwintorok@gmail.com> ocaml/C bindings: getmdstring, add num_op, get_op should work on metadata too

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141286 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
c44943ed4f4f2d44b6668e6b51eb355f8310660c 06-Oct-2011 Torok Edwin <edwintorok@gmail.com> C/OCaml API to retrieve struct name.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141285 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
0e6a24d92ab4661bb39f838ac390ccb17f649cb5 03-Oct-2011 Devang Patel <dpatel@apple.com> Add C api for Instruction->eraseFromParent().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141023 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
7ced7763cab4fc22b8198f39fbbb6b7264cd1628 23-Aug-2011 Nate Begeman <natebegeman@mac.com> Add some useful accessors to c++ api that appear to be missing from the c api


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138371 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
e6e8826870bee3facb04f950f0bd725f8a88623d 12-Aug-2011 Bill Wendling <isanbard@gmail.com> Initial commit of the 'landingpad' instruction.

This implements the 'landingpad' instruction. It's used to indicate that a basic
block is a landing pad. There are several restrictions on its use (see
LangRef.html for more detail). These restrictions allow the exception handling
code to gather the information it needs in a much more sane way.

This patch has the definition, implementation, C interface, parsing, and bitcode
support in it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137501 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
c4d0e9fbddfe6b0ee5d5d7ef8eb1b341a8a242cf 12-Aug-2011 Chris Lattner <sabre@nondot.org> switch to the new struct apis.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137481 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
16005253850679a34b09a70bca32a6c0233380d6 02-Aug-2011 Bill Wendling <isanbard@gmail.com> Remove the LLVMBuildUnwind C API function.

The 'unwind' function is going away with the new EH rewrite. This is step 0 in
keeping front-ends from using it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136683 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
dccc03b2423fe65efb5963ae816b99c24fc53374 31-Jul-2011 Bill Wendling <isanbard@gmail.com> Add the 'resume' instruction for the new EH rewrite.

This adds the 'resume' instruction class, IR parsing, and bitcode reading and
writing. The 'resume' instruction resumes propagation of an existing (in-flight)
exception whose unwinding was interrupted with a 'landingpad' instruction (to be
added later).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136589 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
10c6d12a9fd4dab411091f64db4db69670b88850 30-Jul-2011 Bill Wendling <isanbard@gmail.com> Revert r136253, r136263, r136269, r136313, r136325, r136326, r136329, r136338,
r136339, r136341, r136369, r136387, r136392, r136396, r136429, r136430, r136444,
r136445, r136446, r136253 pending review.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136556 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
7379b6650008fba555d5472d5c76e8efc59e8a21 28-Jul-2011 Bill Wendling <isanbard@gmail.com> The personality function should be a Function* and not just a Value*.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136392 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
28d735230f0b3ac964f07e91594fb6c38772f0e6 28-Jul-2011 Bill Wendling <isanbard@gmail.com> Make sure that the landingpad instruction takes a Constant* as the clause's value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136326 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
772fe17a6d07304ae2e6b3052bbb24ebb751f0f3 27-Jul-2011 Bill Wendling <isanbard@gmail.com> Merge the contents from exception-handling-rewrite to the mainline.

This adds the new instructions 'landingpad' and 'resume'.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136253 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
0a2a60ace9b79164b71794ce7ff981171c61e442 22-Jul-2011 Jay Foad <jay.foad@gmail.com> Convert IRBuilder::CreateGEP and IRBuilder::CreateInBoundsGEP to use
ArrayRef.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135761 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
dab3d29605a5c83db41b28176273ef55961120c1 21-Jul-2011 Jay Foad <jay.foad@gmail.com> 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
/external/llvm/lib/VMCore/Core.cpp
3ba292dbc2acee2d1052fb7ffe332e2164147b47 18-Jul-2011 Jeffrey Yasskin <jyasskin@google.com> Add APInt(numBits, ArrayRef<uint64_t> bigVal) constructor to prevent future ambiguity
errors like the one corrected by r135261. Migrate all LLVM callers of the old
constructor to the new one.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135431 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
39b5abf507b43da6b92f68b86406e0015ead18e9 18-Jul-2011 Frits van Bommel <fvbommel@gmail.com> Migrate LLVM and Clang to use the new makeArrayRef(...) functions where previously explicit non-default constructors were used.
Mostly mechanical with some manual reformatting.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135390 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
db125cfaf57cc83e7dd7453de2d509bc8efd0e5e 18-Jul-2011 Chris Lattner <sabre@nondot.org> land David Blaikie's patch to de-constify Type, with a few tweaks.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135375 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
a3efbb15ddd5aa9006564cd79086723640084878 15-Jul-2011 Jay Foad <jay.foad@gmail.com> Convert CallInst and InvokeInst APIs to use ArrayRef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135265 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
64090bd2d468ec70b9644bdf492684dd278de8a7 14-Jul-2011 Rafael Espindola <rafael.espindola@gmail.com> Add LLVMConstNamedStruct to the C api to let its users create constants
of named struct types.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135178 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
61afc8820f2bc85f7b7158850a0250f9d8c1ebaa 14-Jul-2011 Chris Lattner <sabre@nondot.org> add a couple more missing C api, patch by Vitaly Lugovskiy!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135151 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
d155945f15f73eb5619756d94e69b5bc5319d89a 14-Jul-2011 Frits van Bommel <fvbommel@gmail.com> Simplify some functions in the C API by using an ArrayRef to directly reference the array passed to them instead of copying it to a std::vector.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135145 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
d91aa14075d5c4c093ed1a84ea4b5397ce5f6eb4 14-Jul-2011 Chris Lattner <sabre@nondot.org> add C api for hte new type system rewrite API. Patch by Vitaly Lugovskiy!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135132 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
fc6d3a49867cd38954dc40936a88f1907252c6d2 13-Jul-2011 Jay Foad <jay.foad@gmail.com> Convert InsertValueInst and ExtractValueInst APIs to use ArrayRef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135040 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
5fdd6c8793462549e3593890ec61573da06e3346 12-Jul-2011 Jay Foad <jay.foad@gmail.com> Second attempt at de-constifying LLVM Types in FunctionType::get(),
StructType::get() and TargetData::getIntPtrType().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134982 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
2280ebd61416b73d0b6137f275b25af82e268d1f 12-Jul-2011 Bill Wendling <isanbard@gmail.com> Revert r134893 and r134888 (and related patches in other trees). It was causing
an assert on Darwin llvm-gcc builds.

Assertion failed: (castIsValid(op, S, Ty) && "Invalid cast!"), function Create, file /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.llvm-gcc-i386-darwin9-RA/llvm.src/lib/VMCore/Instructions.cpp, li\
ne 2067.
etc.

http://smooshlab.apple.com:8013/builders/llvm-gcc-i386-darwin9-RA/builds/2354

--- Reverse-merging r134893 into '.':
U include/llvm/Target/TargetData.h
U include/llvm/DerivedTypes.h
U tools/bugpoint/ExtractFunction.cpp
U unittests/Support/TypeBuilderTest.cpp
U lib/Target/ARM/ARMGlobalMerge.cpp
U lib/Target/TargetData.cpp
U lib/VMCore/Constants.cpp
U lib/VMCore/Type.cpp
U lib/VMCore/Core.cpp
U lib/Transforms/Utils/CodeExtractor.cpp
U lib/Transforms/Instrumentation/ProfilingUtils.cpp
U lib/Transforms/IPO/DeadArgumentElimination.cpp
U lib/CodeGen/SjLjEHPrepare.cpp
--- Reverse-merging r134888 into '.':
G include/llvm/DerivedTypes.h
U include/llvm/Support/TypeBuilder.h
U include/llvm/Intrinsics.h
U unittests/Analysis/ScalarEvolutionTest.cpp
U unittests/ExecutionEngine/JIT/JITTest.cpp
U unittests/ExecutionEngine/JIT/JITMemoryManagerTest.cpp
U unittests/VMCore/PassManagerTest.cpp
G unittests/Support/TypeBuilderTest.cpp
U lib/Target/MBlaze/MBlazeIntrinsicInfo.cpp
U lib/Target/Blackfin/BlackfinIntrinsicInfo.cpp
U lib/VMCore/IRBuilder.cpp
G lib/VMCore/Type.cpp
U lib/VMCore/Function.cpp
G lib/VMCore/Core.cpp
U lib/VMCore/Module.cpp
U lib/AsmParser/LLParser.cpp
U lib/Transforms/Utils/CloneFunction.cpp
G lib/Transforms/Utils/CodeExtractor.cpp
U lib/Transforms/Utils/InlineFunction.cpp
U lib/Transforms/Instrumentation/GCOVProfiling.cpp
U lib/Transforms/Scalar/ObjCARC.cpp
U lib/Transforms/Scalar/SimplifyLibCalls.cpp
U lib/Transforms/Scalar/MemCpyOptimizer.cpp
G lib/Transforms/IPO/DeadArgumentElimination.cpp
U lib/Transforms/IPO/ArgumentPromotion.cpp
U lib/Transforms/InstCombine/InstCombineCompares.cpp
U lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
U lib/Transforms/InstCombine/InstCombineCalls.cpp
U lib/CodeGen/DwarfEHPrepare.cpp
U lib/CodeGen/IntrinsicLowering.cpp
U lib/Bitcode/Reader/BitcodeReader.cpp



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134949 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
eeb64ae6e52ac2a7980884fe89c01508014af6a9 11-Jul-2011 Jay Foad <jay.foad@gmail.com> De-constify Types in StructType::get() and TargetData::getIntPtrType().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134893 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
f362affa3a695164a94d275fb44d18f44ebb855a 11-Jul-2011 Jay Foad <jay.foad@gmail.com> De-constify Types in FunctionType::get().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134888 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
1afcace3a3a138b1b18e5c6270caa8dae2261ae2 09-Jul-2011 Chris Lattner <sabre@nondot.org> Land the long talked about "type system rewrite" patch. This
patch brings numerous advantages to LLVM. One way to look at it
is through diffstat:
109 files changed, 3005 insertions(+), 5906 deletions(-)

Removing almost 3K lines of code is a good thing. Other advantages
include:

1. Value::getType() is a simple load that can be CSE'd, not a mutating
union-find operation.
2. Types a uniqued and never move once created, defining away PATypeHolder.
3. Structs can be "named" now, and their name is part of the identity that
uniques them. This means that the compiler doesn't merge them structurally
which makes the IR much less confusing.
4. Now that there is no way to get a cycle in a type graph without a named
struct type, "upreferences" go away.
5. Type refinement is completely gone, which should make LTO much MUCH faster
in some common cases with C++ code.
6. Types are now generally immutable, so we can use "Type *" instead
"const Type *" everywhere.

Downsides of this patch are that it removes some functions from the C API,
so people using those will have to upgrade to (not yet added) new API.
"LLVM 3.0" is the right time to do this.

There are still some cleanups pending after this, this patch is large enough
as-is.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134829 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
267010864e139781ef5949939e081c41f954de0a 22-Jun-2011 Jay Foad <jay.foad@gmail.com> Replace the existing forms of ConstantArray::get() with a single form
that takes an ArrayRef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133615 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
b065b06c12dba6001b8140df2744d0c856ef6ea1 20-Jun-2011 Chris Lattner <sabre@nondot.org> Revamp the "ConstantStruct::get" methods. Previously, these were scattered
all over the place in different styles and variants. Standardize on two
preferred entrypoints: one that takes a StructType and ArrayRef, and one that
takes StructType and varargs.

In cases where there isn't a struct type convenient, we now add a
ConstantStruct::getAnon method (whose name will make more sense after a few
more patches land).

It would be "really really nice" if the ConstantStruct::get and
ConstantVector::get methods didn't make temporary std::vectors.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133412 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
ec9186bcf975c9ffa3ec7ca97867f0ec6eb55115 21-Apr-2011 Jay Foad <jay.foad@gmail.com> PR9214: Convert Metadata API to use ArrayRef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129932 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
8c6d1962107504e92a7413cbacc6afd5cc82cdc3 21-Apr-2011 Nick Lewycky <nicholas@mxc.ca> Structs have elements not parameters. I'm surprised this ever compiled...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129888 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
3ecfc861b4365f341c5c969b40e1afccde676e6f 30-Mar-2011 Jay Foad <jay.foad@gmail.com> 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
/external/llvm/lib/VMCore/Core.cpp
1e09e5b979249ae08082569cbf0ab24d297ee0dd 18-Feb-2011 Rafael Espindola <rafael.espindola@gmail.com> Expose getTypeName to the C API. Patch by Patrick Walton.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125845 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
2ca5c8644e6c35b3a7910a576ed89cddb7b82c3b 15-Feb-2011 Chris Lattner <sabre@nondot.org> convert ConstantVector::get to use ArrayRef.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125537 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
75831904220042260c4faece8507a2807acba47f 14-Feb-2011 Chris Lattner <sabre@nondot.org> revert my ConstantVector patch, it seems to have made the llvm-gcc
builders unhappy.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125504 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
283c8caccd093f8e1d4f0bdd01ac240b4edbd20a 14-Feb-2011 Chris Lattner <sabre@nondot.org> Switch ConstantVector::get to use ArrayRef instead of a pointer+size
idiom. Change various clients to simplify their code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125487 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
4676599e30da78d39d5fe8649a0e5dcb2b6b1372 18-Jan-2011 Cameron Zwarich <zwarich@apple.com> Move DominanceFrontier from VMCore to Analysis.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123747 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
3ff9563c3e391954b2e224afcf8b2b0fcc3888aa 16-Dec-2010 Michael J. Spencer <bigcheesegs@gmail.com> MemoryBuffer now return an error_code and returns a OwningPtr<MemoryBuffer> via an out parm.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121958 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
333fb04506233255f10d8095c9e2de5e5f0fdc6f 09-Dec-2010 Michael J. Spencer <bigcheesegs@gmail.com> Support/MemoryBuffer: Replace all uses of std::string *ErrMsg with error_code &ec. And fix clients.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121379 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
a1ac3bbec703f7faf20cbc06fa0eb9d34bb4f5f6 28-Nov-2010 Chris Lattner <sabre@nondot.org> add a function to the C api to get the context out of a module, patch
by Eric Dobson!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120259 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
5400570097a25f05694d451afed7f949281b789e 23-Nov-2010 Chris Lattner <sabre@nondot.org> add a 'LLVMConstIntOfArbitraryPrecision' api to the C api,
patch by Greg Pfeil!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119989 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
4c8a985ed50c2395c6f08d8153f26673ac3a927b 17-Oct-2010 Benjamin Kramer <benny.kra@googlemail.com> std::string cleanup.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116686 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
b8a1ccfc4b2eb84cc59465e2109019c9f85c9114 07-Oct-2010 Owen Anderson <resistor@mac.com> Add initialization routines for VMCore.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115963 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
1a3d23362168ae6d8e07efd547a92cc36738a789 07-Oct-2010 Owen Anderson <resistor@mac.com> Next step on the getting-rid-of-static-ctors train: begin adding per-library
initialization functions that initialize the set of passes implemented in
that library. Add C bindings for these functions as well.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115927 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
bb811a244567aa8a1522203f15588f4d001b7353 10-Sep-2010 Dale Johannesen <dalej@apple.com> Add X86 MMX type to bitcode and Type.
(The Ada bindings probably need it too, but all the
obvious places to change say "do not edit this file".)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113618 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
61c70e98ac3c7504d31dd9bc81c4e9cb998e9984 28-Aug-2010 Chris Lattner <sabre@nondot.org> remove unions from LLVM IR. They are severely buggy and not
being actively maintained, improved, or extended.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112356 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
55ae515f9db484125a23429d4906c5edaf9f10d2 21-Aug-2010 Bill Wendling <isanbard@gmail.com> Create the new linker type "linker_private_weak_def_auto".

It's similar to "linker_private_weak", but it's known that the address of the
object is not taken. For instance, functions that had an inline definition, but
the compiler decided not to inline it. Note, unlike linker_private and
linker_private_weak, linker_private_weak_def_auto may have only default
visibility. The symbols are removed by the linker from the final linked image
(executable or dynamic library).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111684 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
f7af931930dfab74b8a72b195e53df34b4ea2480 20-Aug-2010 Erick Tryzelaar <idadesub@users.sourceforge.net> Expose LLVMSetOperand and LLVMGetNumOperands to llvm-c and ocaml.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111625 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
11112e0d7b1fb2741ed65a5085037918d1425916 07-Aug-2010 Dan Gohman <gohman@apple.com> Tidy some #includes and forward-declarations, and move the C binding code
out of PassManager.cpp and into Core.cpp with the rest of the C binding code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110494 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
837a0c3b052cdbfd7b212d9e9f570f7aaf864b44 19-Jul-2010 Duncan Sands <baldrick@free.fr> Expose BasicBlock::moveBefore and moveAfter in C API, patch
by Benjamin Saunders.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108699 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
5e721d768254a920b78b9129d79a84c0163cb3f4 01-Jul-2010 Bill Wendling <isanbard@gmail.com> Implement the "linker_private_weak" linkage type. This will be used for
Objective-C metadata types which should be marked as "weak", but which the
linker will remove upon final linkage. However, this linkage isn't specific to
Objective-C.

For example, the "objc_msgSend_fixup_alloc" symbol is defined like this:

.globl l_objc_msgSend_fixup_alloc
.weak_definition l_objc_msgSend_fixup_alloc
.section __DATA, __objc_msgrefs, coalesced
.align 3
l_objc_msgSend_fixup_alloc:
.quad _objc_msgSend_fixup
.quad L_OBJC_METH_VAR_NAME_1

This is different from the "linker_private" linkage type, because it can't have
the metadata defined with ".weak_definition".

Currently only supported on Darwin platforms.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107433 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
07d317711781d8c9268f7d6afcf1ba7eadf1d127 30-Jun-2010 Bill Wendling <isanbard@gmail.com> Revert r107205 and r107207.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107215 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
207855cff9b4811004b9720f28a5bd0adf3784b7 29-Jun-2010 Bill Wendling <isanbard@gmail.com> Introducing the "linker_weak" linkage type. This will be used for Objective-C
metadata types which should be marked as "weak", but which the linker will
remove upon final linkage. For example, the "objc_msgSend_fixup_alloc" symbol is
defined like this:

.globl l_objc_msgSend_fixup_alloc
.weak_definition l_objc_msgSend_fixup_alloc
.section __DATA, __objc_msgrefs, coalesced
.align 3
l_objc_msgSend_fixup_alloc:
.quad _objc_msgSend_fixup
.quad L_OBJC_METH_VAR_NAME_1

This is different from the "linker_private" linkage type, because it can't have
the metadata defined with ".weak_definition".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107205 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
30377e780918aacda1befa47054c61b0155c194c 27-May-2010 Dan Gohman <gohman@apple.com> Add basic error checking to MemoryBuffer::getSTDIN.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104855 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
a75586f37e2409aebce8e330832eec05487aa783 03-May-2010 Nick Lewycky <nicholas@mxc.ca> Fix function prototype mismatch in LLVMUnionType(). Fixes PR7019.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102959 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
0941534c712d77243d9dda5e8c1d927563b4edff 10-Apr-2010 Chris Lattner <sabre@nondot.org> add attributes and module level asm to the ocaml bindings,
patch by Patrick Walton!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100932 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
84e679beea11ac55ed7871eec4deaccdf393de3e 02-Apr-2010 Chris Lattner <sabre@nondot.org> rename NewDebugLoc -> DebugLoc, prune #includes in DebugLoc.h.

This keeps around temporary typedef for clang/llvm-gcc so the
build won't break when I commit this :)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100218 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
a41b9153c3e568c874eb777d2b295659a9aca10a 01-Apr-2010 Chris Lattner <sabre@nondot.org> switch IRBuilder to use NewDebugLoc for locations instead
of raw mdnodes. This allows frontends to specify debug
locations without ever creating an MDNode for the DILocation.

This requires a corresponding clang/llvm-gcc change which
I'll try to commit as simultaneously as possible.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100095 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
24b3733425511cf60268fddda13c306ab140b55f 02-Mar-2010 Erick Tryzelaar <idadesub@users.sourceforge.net> Rename LLVMUseIteratorRef to LLVMUseRef since we don't refer to iterators in llvm-c.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97585 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
6d52102b92aea76b677004a9e72dd84d2e50e163 02-Mar-2010 Duncan Sands <baldrick@free.fr> Rather than passing "false" for InsertBefore, AddressSpace for ThreadLocal,
and nothing for AddressSpace, pass 0 for InsertBefore, "false" for ThreadLocal
and AddressSpace for AddressSpace. Spotted by gcc-4.5.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97563 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
8e130b1d0d53346e05d0a1161a52c6d62de163c4 28-Feb-2010 Erick Tryzelaar <idadesub@users.sourceforge.net> Add support for global variables in an address space for llvm-c and ocaml.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97377 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
c59286bff1cca8c4fa15f390c9002db94117614e 28-Feb-2010 Erick Tryzelaar <idadesub@users.sourceforge.net> Add indirect br support to llvm-c and ocaml.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97376 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
46c80e0c5653e11ada7cebcb46f9a8f7df758e41 28-Feb-2010 Erick Tryzelaar <idadesub@users.sourceforge.net> Add metadata functions to llvm-c and ocaml.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97375 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
19f047f5f6c44d1cd5681f9314b3ff5e7bae122d 28-Feb-2010 Erick Tryzelaar <idadesub@users.sourceforge.net> Add the new builder arthmetic instructions to llvm-c and ocaml.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97372 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
1940dd10dd6b79e3332f384756c268b85d0ad400 28-Feb-2010 Erick Tryzelaar <idadesub@users.sourceforge.net> Add the new union arthmetic instructions to llvm-c and ocaml.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97371 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
abbcc5ee6fa39daadadaa0b583579b3e17f32fd7 28-Feb-2010 Erick Tryzelaar <idadesub@users.sourceforge.net> Add generic binary op and cast builder functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97370 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
f1ac0fd347823c5ab54577702f8eb062bf4ca70b 16-Feb-2010 Kenneth Uildriks <kennethuil@gmail.com> Function attributes have index ~0, not 0

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96370 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
fdfeb6976f07ad10d809b922ed7376ba2a3539be 12-Feb-2010 Chris Lattner <sabre@nondot.org> Add support for a union type in LLVM IR. Patch by Talin!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96011 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
f0356fe140af1a30587b9a86bcfb1b2c51b8ce20 27-Jan-2010 Jeffrey Yasskin <jyasskin@google.com> 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
/external/llvm/lib/VMCore/Core.cpp
d686c8e73f74e37ab5f647b65a12051ee6cbad16 09-Jan-2010 Chris Lattner <sabre@nondot.org> "In order to ease automatic bindings generation, it would be helpful if boolean values were distinguishable from integers. The attached patch introduces "typedef int LLVMBool;", and uses LLVMBool instead of int throughout the C API, wherever a boolean value is called for."

Patch by James Y Knight!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93079 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
e8e01b600cd377504e5288a31152b1db4b8477b1 23-Nov-2009 Duncan Sands <baldrick@free.fr> I forgot to update the prototype for LLVMBuildIntCast when correcting
the body to not pass the name for the isSigned parameter. However it
seems that changing prototypes is a big-no-no, so here I revert the
previous change and pass "true" for isSigned, meaning this always does
a signed cast, which was the previous behaviour assuming the name was
not NULL! Some other C function needs to be introduced for the general
case of signed or unsigned casts. This hopefully unbreaks the ocaml
binding.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89648 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
46785e68b8bfd536a2bc4ead66ee90ef008636d9 16-Nov-2009 Duncan Sands <baldrick@free.fr> BuildIntCast takes an additional parameter, isSigned.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88910 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
d65267ee625bb9cf8dc655a0c0409760e2b76c71 10-Nov-2009 Daniel Dunbar <daniel@zuster.org> Fix MemoryBuffer::getSTDIN to *not* return null if stdin is empty, this is a lame API.

Also, Stringrefify some more MemoryBuffer functions, and add two performance FIXMEs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86630 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
9d0b704e3ea418441001dac4d1a56c2c224cdbf5 07-Nov-2009 Victor Hernandez <vhernandez@apple.com> 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
/external/llvm/lib/VMCore/Core.cpp
df98761d08ae091420b7e9c1366de7684400fc36 06-Nov-2009 Victor Hernandez <vhernandez@apple.com> 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
/external/llvm/lib/VMCore/Core.cpp
24f934d0551e33508c4ffd24318ea0e970db9810 05-Nov-2009 Victor Hernandez <vhernandez@apple.com> 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
/external/llvm/lib/VMCore/Core.cpp
046e78ce55a7c3d82b7b6758d2d77f2d99f970bf 27-Oct-2009 Victor Hernandez <vhernandez@apple.com> 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
/external/llvm/lib/VMCore/Core.cpp
8ba2d5befc05ca73d3bac8708819bbbe759e2cf9 22-Oct-2009 Dale Johannesen <dalej@apple.com> Rename msasm to alignstack per review.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84795 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
3fc35c594cbe48070ad69eaa2fdca1e9424c9fd4 18-Oct-2009 Nick Lewycky <nicholas@mxc.ca> Fix test/Bindings/Ocaml/vmcore.ml. When IRBuilder::CreateMalloc was removed,
LLVMBuildMalloc was reimplemented but with the bug that it didn't insert the
resulting instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84374 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
13ad5aaaff8a446758b402fd5e9aea22f5bc5682 17-Oct-2009 Victor Hernandez <vhernandez@apple.com> 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
/external/llvm/lib/VMCore/Core.cpp
4360298d2bf3c1ba8595a415cfa235df0bc76335 13-Oct-2009 Dale Johannesen <dalej@apple.com> Add an "msasm" flag to inline asm as suggested in PR 5125.
A little ugliness is accepted to keep the binary file format
compatible. No functional change yet.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84020 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
885dffc3914be3e33cffdd2496ed031f6d8acd08 12-Oct-2009 Chris Lattner <sabre@nondot.org> add some more hooks to the C bindings, patch by Kenneth Uildriks!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83821 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
d0c5a292aaf4d9d69c77fe059bfcbab0496d5f2c 28-Sep-2009 Dan Gohman <gohman@apple.com> Add C API calls for building FNeg operations. Patch by KS Sreeram!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83021 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
3e0c99a26f365bddb667124db40a5734e35c5a2d 25-Sep-2009 Victor Hernandez <vhernandez@apple.com> 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
/external/llvm/lib/VMCore/Core.cpp
96b930ddc7f0df9e278a5cb65ad77a559a20964e 24-Sep-2009 Victor Hernandez <vhernandez@apple.com> 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
/external/llvm/lib/VMCore/Core.cpp
6e7ad958683f34bf6c014c88fef723e5a2d741be 04-Sep-2009 Dan Gohman <gohman@apple.com> Revert 80959. It isn't sufficient to solve the full problem. And it
introduced regressions in the Ocaml bindings tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80969 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
e56a94ef91009ddb8d8b68783ff1650bcad3b326 04-Sep-2009 Dan Gohman <gohman@apple.com> Remove the API for creating ConstantExprs with the nsw, nuw, inbounds,
and exact flags. Because ConstantExprs are uniqued, creating an
expression with this flag causes all expressions with the same operands
to have the same flag, which may not be safe. Add, sub, mul, and sdiv
ConstantExprs are usually folded anyway, so the main interesting flag
here is inbounds, and the constant folder already knows how to set the
inbounds flag automatically in most cases, so there isn't an urgent need
for the API support.

This can be reconsidered in the future, but for now just removing these
API bits eliminates a source of potential trouble with little downside.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80959 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
65c3c8f323198b99b88b109654194540cf9b3fa5 02-Sep-2009 Sandeep Patel <deeppatel1987@gmail.com> Retype from unsigned to CallingConv::ID accordingly. Approved by Bob Wilson.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80773 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
e0a1bf64c9885df16bf596447d037f1c75f92637 17-Aug-2009 Erick Tryzelaar <idadesub@users.sourceforge.net> Expose creating constant ints and floats from strings in llvm-c.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79213 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
5c1c2082968ff4c36063ed09c4eea772eb808b6a 16-Aug-2009 Erick Tryzelaar <idadesub@users.sourceforge.net> Add an llvm-c function that lets you insert an instruction with a name.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79163 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
56b22697d81cc4f520e3023e914f38081b9b6a0c 16-Aug-2009 Erick Tryzelaar <idadesub@users.sourceforge.net> Expose most of the Constant creation functions to llvm-c.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79160 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
f72596c04a06458c6152a51c9678690a34d59ab8 16-Aug-2009 Erick Tryzelaar <idadesub@users.sourceforge.net> Expose most of the rest of IRBuilder's functions to llvm-c.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79159 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
22c3f1877d22972adb787c553192edb426874594 14-Aug-2009 Erick Tryzelaar <idadesub@users.sourceforge.net> Expose LLVMContext to llvm-c.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78964 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
0e275dc53880a7f14f8b8c83cc6e0290a215492d 14-Aug-2009 Owen Anderson <resistor@mac.com> Actually privatize a IntegerTypes, and fix a few bugs exposed by this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78955 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
1d0be15f89cb5056e20e2d24faa8d6afb1573bca 13-Aug-2009 Owen Anderson <resistor@mac.com> Push LLVMContexts through the IntegerType APIs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78948 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
8113c6739e854d94910491965d83797487bc8a54 06-Aug-2009 Daniel Dunbar <daniel@zuster.org> Don't search the entire type table just to delete a type by name.
- This also fixes the ENABLE_EXPENSIVE_CHECKS failure on vmcore.ml.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78287 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
d7f2a6cb3fbc012763adb42fd967f6fefbb22a37 06-Aug-2009 Owen Anderson <resistor@mac.com> Privatize the StructType table, which unfortunately involves routing contexts through a number of APIs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78258 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
a7235ea7245028a0723e8ab7fd011386b3900777 31-Jul-2009 Owen Anderson <resistor@mac.com> 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
/external/llvm/lib/VMCore/Core.cpp
9e9a0d5fc26878e51a58a8b57900fcbf952c2691 31-Jul-2009 Owen Anderson <resistor@mac.com> Move more code back to 2.5 APIs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77635 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
debcb01b0f0a15f568ca69e8f288fade4bfc7297 30-Jul-2009 Owen Anderson <resistor@mac.com> 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
/external/llvm/lib/VMCore/Core.cpp
baf3c404409d5e47b13984a7f95bfbd6d1f2e79e 29-Jul-2009 Owen Anderson <resistor@mac.com> Move ConstantExpr to 2.5 API.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77494 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
af7ec975870f92245f1f1484ac80a1e2db6a0afa 28-Jul-2009 Owen Anderson <resistor@mac.com> Return ConstantVector to 2.5 API.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77366 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
1fd7096407d5e598ed3366a1141548e71273f1c5 28-Jul-2009 Owen Anderson <resistor@mac.com> Change ConstantArray to 2.5 API.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77347 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
8fa3338ed2400c1352b137613d2c2c70d1ead695 28-Jul-2009 Owen Anderson <resistor@mac.com> Move ConstantStruct back to 2.5 API.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77266 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
6f83c9c6ef0e7f79825a0a8f22941815e4b684c7 27-Jul-2009 Owen Anderson <resistor@mac.com> 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
/external/llvm/lib/VMCore/Core.cpp
93b67e40de356569493c285b86b138a3f11b5035 26-Jul-2009 Daniel Dunbar <daniel@zuster.org> Eliminate some uses of DOUT, cerr, and getNameStart().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77145 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
eed707b1e6097aac2bb6b3d47271f6300ace7f2e 25-Jul-2009 Owen Anderson <resistor@mac.com> 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
/external/llvm/lib/VMCore/Core.cpp
4aebcb4f5f69e545da86f7482a19a6a3902a5f9f 20-Jul-2009 Bill Wendling <isanbard@gmail.com> Change the casting of linkage types into a map. This makes this much more robust
as it no longer depends upon two different enums being kept in sync with each
other.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76465 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
efd280b4caf261b95551a317bb398a90d2e90011 17-Jul-2009 Daniel Dunbar <daniel@zuster.org> Fix compiler warning (for -Asserts).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76110 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
0df5c8e3f1061cd23f8abde64840828f713d4597 16-Jul-2009 Chris Lattner <sabre@nondot.org> Update the C bindings to keep the LLVMTypeKind up to date between the C/C++
stuff. Patch by Zoltan Varga!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75842 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
c23197a26f34f559ea9797de51e187087c039c42 14-Jul-2009 Torok Edwin <edwintorok@gmail.com> 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").


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75640 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
c25e7581b9b8088910da31702d4ca21c4734c6d7 11-Jul-2009 Torok Edwin <edwintorok@gmail.com> 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75379 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
d1fbd142945f5ef0c273c3d756431f8cb9d25ded 08-Jul-2009 Owen Anderson <resistor@mac.com> Push LLVMContext _back_ through IRBuilder.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75040 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
e9b11b431308f4766b73cda93e38ec930c912122 08-Jul-2009 Owen Anderson <resistor@mac.com> 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
/external/llvm/lib/VMCore/Core.cpp
3d29df3e8a203b167d8071ea6f805b21db18a5af 08-Jul-2009 Owen Anderson <resistor@mac.com> Push LLVMContext through GlobalVariables and IRBuilder.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74985 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
62e744b555d48b4c8b9023739fef8ae403bb20e8 07-Jul-2009 Owen Anderson <resistor@mac.com> LLVMContext-ifiy the implementation of the C API.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74950 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
e4840bc611f8260065d3879a412ea3b501550995 06-Jul-2009 Chris Lattner <sabre@nondot.org> Add two new accessors to the C bindings, patch by Wladimir van der Laan!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74836 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
c8897d9c2f9fcee6061a2c2d380028269026a836 02-Jul-2009 Owen Anderson <resistor@mac.com> Restore other bits of the C API that I tore up. All pre-existing APIs default to using the
default global context, while new *InContext() APIs have been added that take a LLVMContextRef parameter.

Apologies to anyone affected by this breakage.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74694 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
c70e62110b7e165ab8f04c38ffd97f905dcda95d 02-Jul-2009 Owen Anderson <resistor@mac.com> Add a C wrapper for accessing the global default context.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74675 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
31895e73591d3c9ceae731a1274c8f56194b9616 01-Jul-2009 Owen Anderson <resistor@mac.com> 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
/external/llvm/lib/VMCore/Core.cpp
8b477ed579794ba6d76915d56b3f448a7dd20120 01-Jul-2009 Owen Anderson <resistor@mac.com> 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
/external/llvm/lib/VMCore/Core.cpp
ef854af5bd231ae0c059eb4f07d13352d2a50a9d 21-May-2009 Duncan Sands <baldrick@free.fr> Add a getAlignOf helper for getting the ABI alignment of a
type as a target independent constant expression. I confess
that I didn't check that this method works as intended (though
I did test the equivalent hand-written IR a little). But what
could possibly go wrong!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72213 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
e149e9960ba0726f4b084763f7ef95afa12d9a88 06-May-2009 Duncan Sands <baldrick@free.fr> OCaml parameter attribute bindings from PR2752.
Incomplete, but better than nothing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71081 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
2a9c671a51126def8020870103316e6aedc73edf 19-Dec-2008 Gordon Henriksen <gordonhenriksen@mac.com> C bindings for dyn_cast_or_null.
This operation can be used to build dyn_cast, isa, and cast.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61252 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
851ba39dab544ad986f150aec9573add9d978397 17-Dec-2008 Chris Lattner <sabre@nondot.org> This adds some missing functions to the C binding:
- ability to insert previously created instructions using a builder
- creation of aliases
- creation of inline asm constants

Patch by Zoltan Varga!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61153 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
b593117b44a74c72bc784080bb402576b3181d94 03-Nov-2008 Dan Gohman <gohman@apple.com> Add C bindings for extractvalue and insertvalue. Patch by Frits van Bommel!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58650 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
23a98551ab65eeb8fe5019df8b7db4891582a4bd 10-Oct-2008 Dale Johannesen <dalej@apple.com> Add a "loses information" return value to APFloat::convert
and APFloat::convertToInteger. Restore return value to
IEEE754. Adjust all users accordingly.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57329 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
0598866c052147c31b808391f58434ce3dbfb838 25-Sep-2008 Devang Patel <dpatel@apple.com> Large mechanical patch.

s/ParamAttr/Attribute/g
s/PAList/AttrList/g
s/FnAttributeWithIndex/AttributeWithIndex/g
s/FnAttr/Attribute/g

This sets the stage
- to implement function notes as function attributes and
- to distinguish between function attributes and return value attributes.

This requires corresponding changes in llvm-gcc and clang.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56622 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
07cabf6102800aa701bc4d1bd282fafb63b8a416 30-Aug-2008 Gordon Henriksen <gordonhenriksen@mac.com> PR2731: C and Ocaml bindings for setTailCall and isTailCall.

Based on patch by Giorgos Korfiatis.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55570 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
5eca075b74d62c621b160aa216b4cd50829a2cc7 17-Aug-2008 Gordon Henriksen <gordonhenriksen@mac.com> Rename some GC classes so that their roll will hopefully be clearer.

In particular, Collector was confusing to implementors. Several
thought that this compile-time class was the place to implement
their runtime GC heap. Of course, it doesn't even exist at runtime.
Specifically, the renames are:

Collector -> GCStrategy
CollectorMetadata -> GCFunctionInfo
CollectorModuleMetadata -> GCModuleInfo
CollectorRegistry -> GCRegistry
Function::getCollector -> getGC (setGC, hasGC, clearGC)

Several accessors and nested types have also been renamed to be
consistent. These changes should be obvious.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54899 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
f068263cbc523a3d80f08735d92b347680707aa0 09-Aug-2008 Gordon Henriksen <gordonhenriksen@mac.com> Delete a redundant binding, LLVMHasInitializer.

Please use !LLVMIsDeclaration instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54572 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
7a61d701c0870642e075e90b6a1ad03a8ac9bc67 08-Aug-2008 Eric Christopher <echristo@apple.com> 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
/external/llvm/lib/VMCore/Core.cpp
4d515d0b09d43af59cd040bfb8bf1b7a2b992980 22-Jun-2008 Dan Gohman <gohman@apple.com> Use Function's arg_size() and size() methods.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52605 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
83eaae19add8031b299fc657cb69ceb5bfa44ae4 19-May-2008 Gordon Henriksen <gordonhenriksen@mac.com> Remove a duplicative binding. Patch by Mahadevan R.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51238 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
16c1f44d91211a225497062ea508d58fd25085a9 04-May-2008 Gordon Henriksen <gordonhenriksen@mac.com> Use (void) instead of () in C code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50620 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
e2435da8abe5ca62c7f08f29c242b6b98e0ec7af 28-Apr-2008 Gordon Henriksen <gordonhenriksen@mac.com> Expose parameter attributes via C bindings.

Patch by Anders Johnsen!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50360 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
eb9c8e1e3fd81607f8aa71f2b8b1592d6d333337 20-Apr-2008 Chris Lattner <sabre@nondot.org> Use simplified ConstantFP::get method, fix a bug handling frem x, 0 with long doubles.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49976 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
89f6d88db334ba088672ae0753deb7d7b7509bac 13-Apr-2008 Duncan Sands <baldrick@free.fr> 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
/external/llvm/lib/VMCore/Core.cpp
051a950000e21935165db56695e35bade668193b 06-Apr-2008 Gabor Greif <ggreif@gmail.com> 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
/external/llvm/lib/VMCore/Core.cpp
038112a4e0a9afd656f415ab397a230ae5921627 01-Apr-2008 Chris Lattner <sabre@nondot.org> Change the MemoryBuffer::getFile* methods to take just a pointer to the
start of a filename, not a filename+length. All clients can produce a
null terminated name, and the system api's require null terminated
strings anyway.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49041 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
4733be38930ae81716bba9ae75a8281bcb180634 23-Mar-2008 Gordon Henriksen <gordonhenriksen@mac.com> Objective Caml bindings for basic block, function, global, and arg iterators.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48711 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
34000979662d9ae9b22e4d05272b77d944871d1c 19-Mar-2008 Gordon Henriksen <gordonhenriksen@mac.com> C bindings for Module-, Function-, and BasicBlock::iterator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48528 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
dc1ce7bdc6e32e7a4c4a110caa32834730183c1b 19-Mar-2008 Gordon Henriksen <gordonhenriksen@mac.com> C and Objective Caml bindings for the various getParent methods of the IR.

Based on Erick Tryzelaar's patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48523 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
af59b105bb3f9a31f1812e470eb9db28a8a1b491 15-Mar-2008 Gordon Henriksen <gordonhenriksen@mac.com> Expose Module::dump via C and Ocaml.

Patch by Erick Tryzelaar.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48379 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
ae9f3a3b7c915f725aef5a7250e88eaeddda03c6 20-Feb-2008 Anton Korobeynikov <asl@math.spbu.ru> Unbreak build with gcc 4.3: provide missed includes and silence most annoying warnings.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
e62a8a353c3b21b551c00b9025800d3352e5349e 02-Feb-2008 Gordon Henriksen <gordonhenriksen@mac.com> Fixing a bug creating floating point constants of type other
than double through the C bindings. Thanks to Tomas Lindquist
Olsen for reporting it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46656 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
ab477ccde9382b58d3883eeb574ba09469d4cde8 01-Jan-2008 Gordon Henriksen <gordonhenriksen@mac.com> Adding C bindings for SwitchInst::addCase.

Patch by Bryan O'Sullivan!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45481 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
dc2c07a7cf7b21cfb164fc9c2eee0523a43e4cea 30-Dec-2007 Gordon Henriksen <gordonhenriksen@mac.com> Add some doxygen comments to llvm-c/Core.h.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45450 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
4ee451de366474b9c228b4e5fa573795a715216d 29-Dec-2007 Chris Lattner <sabre@nondot.org> 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
/external/llvm/lib/VMCore/Core.cpp
a353ffa7e556bfd2864474911174da691117f691 27-Dec-2007 Gordon Henriksen <gordonhenriksen@mac.com> Adding bindings for target triple and data layout.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45369 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
1d2e49cd84290e19ffcf1011a650cf04dac6a1cd 27-Dec-2007 Gordon Henriksen <gordonhenriksen@mac.com> Switch the bindings to use LLVMFoldingBuilder.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
da1435f86ebc9886dd7704294e01d192d79e069c 19-Dec-2007 Gordon Henriksen <gordonhenriksen@mac.com> Adding bindings for memory buffers and module providers. Switching
to exceptions rather than variants for error handling in Ocaml.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45226 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
57cebeec7ba08b55f29f5bf98ad0a3a17e9d0c71 17-Dec-2007 Gordon Henriksen <gordonhenriksen@mac.com> C and Ocaml bindings for address spaces, for that burgeoning market
for Ocaml-based compilers targeting embedded devices. :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45096 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
43ad6b3e0d6ada51e9b23aab3e061187f1f5710c 17-Dec-2007 Christopher Lamb <christopher.lamb@gmail.com> Change the PointerType api for creating pointer types. The old functionality of PointerType::get() has become PointerType::getUnqual(), which returns a pointer in the generic address space. The new prototype of PointerType::get() requires both a type and an address space.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45082 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
1ae6135fa37eb061499d079b9b33dc82dcc1283f 12-Dec-2007 Gordon Henriksen <gordonhenriksen@mac.com> Add (very basic) bindings for ModuleProvider.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44899 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
80a75bfae980df96f969f1c05b0c4a80ce975240 10-Dec-2007 Gordon Henriksen <gordonhenriksen@mac.com> Adding a collector name attribute to Function in the IR. These
methods are new to Function:

bool hasCollector() const;
const std::string &getCollector() const;
void setCollector(const std::string &);
void clearCollector();

The assembly representation is as such:

define void @f() gc "shadow-stack" { ...

The implementation uses an on-the-side table to map Functions to
collector names, such that there is no overhead. A StringPool is
further used to unique collector names, which are extremely
likely to be unique per process.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44769 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
2618a6c1122d5d2007787fb56156be44b21ab32a 08-Oct-2007 Gordon Henriksen <gordonhenriksen@mac.com> C and Objective Caml bindings for PHINode::addIncoming etc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42760 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
b428657504c72b5507419ce73ac9e305064ba9fb 08-Oct-2007 Evan Cheng <evan.cheng@apple.com> Remove debugging printf to get build going on x86-64.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42757 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
6d6203dff3560a2cc3ac8ec620ac3b105b0c7cc7 08-Oct-2007 Gordon Henriksen <gordonhenriksen@mac.com> C and Objective Caml bindings for getFunction and getNamedGlobal. Also enhanced
the Objective Caml 'declare_*' functions to behave more or less like
getOrInsertFunction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42740 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
c84c16be9b29b4f805b92bfc2d93e2dfaa952f8f 07-Oct-2007 Gordon Henriksen <gordonhenriksen@mac.com> C and Objective Caml bindings for GlobalVariable::isConstant.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42736 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
1cf08fddc7413076dedad58dbb8d8d67e69a490f 07-Oct-2007 Gordon Henriksen <gordonhenriksen@mac.com> C and Objective Caml bindings for PATypeHolder.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42713 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
81a788176ecf158432af2b208b0a85321e5ec74a 06-Oct-2007 Gordon Henriksen <gordonhenriksen@mac.com> Adopting a uniform naming convention for type constructors in bindings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42698 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
e3b989d4a4ba47f77d5d38c35ff17e9673d9f87b 06-Oct-2007 Gordon Henriksen <gordonhenriksen@mac.com> Adopting a uniform naming convention for constant constructors in bindings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42697 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
4647569fe7706e76135a08ca0e5f90a447ccc5b4 06-Oct-2007 Gordon Henriksen <gordonhenriksen@mac.com> Adding C and Ocaml bindings for ConstantExpr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42696 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
88cc699942f7f972ef9bc3afa1df0a44d059e1d8 06-Oct-2007 Gordon Henriksen <gordonhenriksen@mac.com> Wrapping Value::dump.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42668 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
acd96191cd8d85f376ec0baafdc4f21b3042f677 06-Oct-2007 Gordon Henriksen <gordonhenriksen@mac.com> Removing the silly CHelpers header by rolling wrap and unwrap into the C
bindings headers themselves, hidden behind #ifdef __cplusplus.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42666 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
d070d1e56fbfdad752342838dda39e14582ccad5 29-Sep-2007 Gordon Henriksen <gordonhenriksen@mac.com> Demoting CHelpers.h to include/llvm/Support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42465 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
46abf91f7378fb7bb118d66fe6d69b5d3af1e9d5 26-Sep-2007 Gordon Henriksen <gordonhenriksen@mac.com> Added C and Ocaml bindings for functions, basic blocks, and
instruction creation. No support yet for instruction introspection.

Also eliminated allocas from the Ocaml bindings for portability,
and avoided unnecessary casts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
344be5fbecec9908bab611eafeae0549ba3be6d7 18-Sep-2007 Gordon Henriksen <gordonhenriksen@mac.com> Tests of the ocaml (and thus C) bindings for constants.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42101 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp
8b94a14a782867b1da1f272b6f502562d0c2a1aa 18-Sep-2007 Gordon Henriksen <gordonhenriksen@mac.com> C bindings for libLLVMCore.a and libLLVMBitWriter.a.

- The naming prefix is LLVM.
- All types are represented using opaque references.
- Functions are not named LLVM{Type}{Method}; the names became
unreadable goop. Instead, they are named LLVM{ImperativeSentence}.
- Where an attribute only appears once in the class hierarchy (e.g.,
linkage only applies to values; parameter types only apply to
function types), the class is omitted from identifiers for
brevity. Tastes like methods.
- Strings are C strings or string/length tuples on a case-by-case
basis.
- APIs which give the caller ownership of an object are not mapped
(removeFromParent, certain constructor overloads). This keeps
keep memory management as simple as possible.

For each library with bindings:

llvm-c/<LIB>.h - Declares the bindings.
lib/<LIB>/<LIB>.cpp - Implements the bindings.

So just link with the library of your choice and use the C header
instead of the C++ one.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42077 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Core.cpp