Commit Graph

48173 Commits

Author SHA1 Message Date
Chris Lattner a3a9ebf506 Switch all the MC tests to use FileCheck.
llvm-svn: 75039
2009-07-08 20:50:34 +00:00
Chris Lattner 3ffc901c6a convert to FileCheck style.
llvm-svn: 75038
2009-07-08 20:40:54 +00:00
Bob Wilson 1d298fd75b Implement NEON vst1 instruction.
llvm-svn: 75037
2009-07-08 20:32:02 +00:00
David Goodwin 03ab0bbb24 Generalize opcode selection in ARMBaseRegisterInfo.
llvm-svn: 75036
2009-07-08 20:28:28 +00:00
Xerxes Ranby b009980f0b Fix cmake build.
Added ARMBaseRegisterInfo.cpp to lib/Target/ARM/CMakeLists.txt

llvm-svn: 75035
2009-07-08 20:13:41 +00:00
Devang Patel d2541158da Support MDNode forward reference.
llvm-svn: 75031
2009-07-08 19:23:54 +00:00
Dan Gohman dc19104267 Make the code that updates ScalarEvolution's internal state in response
to a loop deletion more thorough. Don't prune the def-use tree search at
instructions that don't have SCEVs computed, because an instruction with
a user that has a computed SCEV may itself lack a computed SCEV.  Also,
remove loop-related values from the ValuesAtScopes and
ConstantEvolutionLoopExitValues maps as well.

This fixes a regression in 483.xalancbmk.

llvm-svn: 75030
2009-07-08 19:23:34 +00:00
Dan Gohman 7bb3173ff7 Tell ScalarEvolution to forget a loop before starting to delete it.
This way ScalarEvolution can examine the loop to determine what state
it needs to update, if it chooses.

llvm-svn: 75029
2009-07-08 19:14:29 +00:00
Torok Edwin fa04002254 Convert more abort() calls to llvm_report_error().
Also remove trailing semicolon.

llvm-svn: 75027
2009-07-08 19:04:27 +00:00
Owen Anderson b17f32945f Switch GlobalVariable ctors to a sane API, where *either* a context or a module is required.
llvm-svn: 75025
2009-07-08 19:03:57 +00:00
Chris Lattner d5ffa8ffb6 add some more check for vector compares.
llvm-svn: 75024
2009-07-08 18:51:25 +00:00
Chris Lattner 072198a2a1 convert a test to "FileCheck" style.
llvm-svn: 75023
2009-07-08 18:48:24 +00:00
Chris Lattner ee3c74fba0 Add a new little "FileCheck" utility for regression testing.
llvm-svn: 75022
2009-07-08 18:44:05 +00:00
David Goodwin 9ca33e8a9f Push methods into base class in preparation for sharing.
llvm-svn: 75020
2009-07-08 18:31:39 +00:00
Bob Wilson f731a2df6b Implement NEON vld1 instructions.
llvm-svn: 75019
2009-07-08 18:11:30 +00:00
Torok Edwin 6dd2730024 Start converting to new error handling API.
cerr+abort -> llvm_report_error
assert(0)+abort -> LLVM_UNREACHABLE (assert(0)+llvm_unreachable-> abort() included)

llvm-svn: 75018
2009-07-08 18:01:40 +00:00
David Goodwin b841376098 Conform...
llvm-svn: 75017
2009-07-08 17:55:48 +00:00
David Goodwin eebf58805c Start breaking out common base functionality for register info.
llvm-svn: 75016
2009-07-08 17:28:55 +00:00
Chris Lattner 9b4b741414 convert comments to doxygen style
llvm-svn: 75015
2009-07-08 17:09:18 +00:00
David Goodwin 121563c615 Add rev16 test... xfail for now
llvm-svn: 75012
2009-07-08 16:15:06 +00:00
David Goodwin 27ab3af0d7 Add myself to blame file...
llvm-svn: 75011
2009-07-08 16:12:12 +00:00
David Goodwin af7451b674 Checkpoint Thumb2 Instr info work. Generalized base code so that it can be shared between ARM and Thumb2. Not yet activated because register information must be generalized first.
llvm-svn: 75010
2009-07-08 16:09:28 +00:00
Duncan Sands 3f1e2409cc Remove trailing whitespace. Reorder some methods
and cases alphabetically.  No functionality change.

llvm-svn: 75001
2009-07-08 11:36:39 +00:00
Rafael Espindola ca4231e353 Update the example to show that an archive can contain llvm bitcode.
llvm-svn: 75000
2009-07-08 11:13:34 +00:00
Alisdair Meredith be1cb301c2 Trial first commit
Fixed build, requires std header before using std::string

llvm-svn: 74995
2009-07-08 09:04:19 +00:00
Sanjiv Gupta 16019aaa4f Mark sublw_cc and subfw_cc as Terminator insns so that they are part of the terminator insns for a basic block alongwith branch insns. This way a copy is not getting inserted between cmp and branch during PHIElimination disturbing the status flags.
llvm-svn: 74992
2009-07-08 05:40:05 +00:00
Nick Lewycky a21d3daadc Remove the vicmp and vfcmp instructions. Because we never had a release with
these instructions, no autoupgrade or backwards compatibility support is
provided.

llvm-svn: 74991
2009-07-08 03:04:38 +00:00
Evan Cheng 14965760a7 Add a Thumb2 instruction flag to that indicates whether the instruction can be transformed to 16-bit variant.
llvm-svn: 74988
2009-07-08 01:46:35 +00:00
Owen Anderson 5948fdf68b Push LLVMContext through GlobalVariables and IRBuilder.
llvm-svn: 74985
2009-07-08 01:26:06 +00:00
Chris Lattner d41531a2c0 remove two methods that no longer exist.
llvm-svn: 74982
2009-07-08 01:07:39 +00:00
Chris Lattner e4807c5767 more getting windows to build.
llvm-svn: 74981
2009-07-08 00:52:12 +00:00
Chris Lattner 04bf64d43c eliminate the v[if]cmp versions of these tests, now that [if]cmp+sext works.
llvm-svn: 74980
2009-07-08 00:49:35 +00:00
Chris Lattner dc84b31d94 Change these tests to use [fi]cmp+sext instead of v[fi]cmp. No
functionality change.

llvm-svn: 74979
2009-07-08 00:46:57 +00:00
Chris Lattner 4ac607332d dag combine sext(setcc) -> vsetcc before legalize. To make this safe,
VSETCC must define all bits, which is different than it was documented
to before.  Since all targets that implement VSETCC already have this
behavior, and we don't optimize based on this, just change the 
documentation.  We now get nice code for vec_compare.ll

llvm-svn: 74978
2009-07-08 00:31:33 +00:00
Chris Lattner e3241b5719 hopefully fix the build on windows.
llvm-svn: 74977
2009-07-08 00:29:32 +00:00
Evan Cheng b61e3a83ee Add a todo.
llvm-svn: 74976
2009-07-08 00:05:05 +00:00
Evan Cheng f0080b734a Also statically set bit 25 for BR_JT instructions.
llvm-svn: 74974
2009-07-07 23:45:10 +00:00
Owen Anderson 155dccd87c LLVMContext-ification.
llvm-svn: 74973
2009-07-07 23:43:39 +00:00
Evan Cheng 2cff076cfe Statically encode bit 25 to indicate immediate form of data processing instructions. Patch by Sean Callanan.
llvm-svn: 74972
2009-07-07 23:40:25 +00:00
Bill Wendling 69bf0a1e2a --- Reverse-merging (from foreign repository) r74952 into '.':
U    lib/Target/X86/X86RegisterInfo.cpp
U    lib/Target/X86/X86RegisterInfo.h

Temporarily revert. This was causing an infinite loop in the linker on Leopard.

llvm-svn: 74970
2009-07-07 23:37:49 +00:00
Chris Lattner f3989abdbf SelectionDAG::SignBitIsZero doesn't work right for vectors,
for now, conservatively return false.

llvm-svn: 74969
2009-07-07 23:28:46 +00:00
Dale Johannesen 9e5b64b7b7 Commit the file I actually changed as part of last
patch, instead of one I didn't.

llvm-svn: 74968
2009-07-07 23:28:22 +00:00
Dale Johannesen 4e33115e5e Operand of asm("call") (the callee function) is represented
as "X" constraint and "P" modifier on x86.  Make this work.
(Change may not be sufficient to fix it for non-Darwin, but
I'm pretty sure it won't break anything.)
gcc.apple/asm-block-32.c
gcc.apple/asm-block-33.c

llvm-svn: 74967
2009-07-07 23:26:33 +00:00
Chris Lattner fc74e8241a add support for legalizing an icmp where the result is illegal (4xi1) but
the input is legal (4 x i32)

llvm-svn: 74964
2009-07-07 23:03:54 +00:00
Chris Lattner cbbf747b7b add a trivial test that vector compares work.
llvm-svn: 74963
2009-07-07 22:51:09 +00:00
Chris Lattner f48f3be185 random code cleanups.
llvm-svn: 74962
2009-07-07 22:49:15 +00:00
Chris Lattner 30220d8f98 implement support for spliting and scalarizing vector setcc's. This
finishes off enough support for vector compares to get the icmp/fcmp
version of 2008-07-23-VSetCC.ll passing.

llvm-svn: 74961
2009-07-07 22:47:46 +00:00
Chris Lattner f2af7f44e7 lower vector icmp/fcmp to ICMP/FCMP nodes with the right result
(vector of bool).

llvm-svn: 74960
2009-07-07 22:41:32 +00:00
Chris Lattner 119421421a ScalarizeVecRes_ShiftOp and ScalarizeVecRes_BinOp are the same,
eliminate the former.

llvm-svn: 74959
2009-07-07 22:28:41 +00:00
Bob Wilson b1a1437a01 Change NEON vldN/vstN intrinsics to specify "N" as an immediate operand
instead of having a separate intrinsic for each value.

llvm-svn: 74958
2009-07-07 22:27:20 +00:00
Chris Lattner cc1fed3111 add support for vector legalizing of *_EXTEND.
llvm-svn: 74957
2009-07-07 22:27:17 +00:00
Jeffrey Yasskin 90b081ac15 Fix http://llvm.org/PR4481: Make llvm-config print the right include paths when
srcdir!=objdir.

llvm-svn: 74956
2009-07-07 22:15:37 +00:00
Devang Patel 64eafd43ff Disable loop index split for now and let nightly tester verify its usefulness.
llvm-svn: 74955
2009-07-07 22:09:42 +00:00
Chris Lattner 87d4f309f5 verify that the fcmp version of this works just as well as the
vfcmp version.  We actually get better code for this silly testcase.

llvm-svn: 74954
2009-07-07 22:07:47 +00:00
Devang Patel 14fd73b08d Accidently dropped this while removing dead code in previous commit.
llvm-svn: 74953
2009-07-07 21:55:14 +00:00
Bill Wendling 7a87a78c6c DWARF requires frame moves be specified at specific times. If you have a
prologue like this:

__Z3fooi:
Leh_func_begin1:
LBB1_0: ## entry
        pushl   %ebp
Llabel1:
        movl    %esp, %ebp
Llabel2:
        pushl   %esi
Llabel3:
        subl    $20, %esp
        call    "L1$pb"
"L1$pb":
        popl    %esi

The "pushl %ebp" needs a table entry specifying the offset. The "movl %esp,
%ebp" makes %ebp the new stack frame register, so that needs to be specified in
DWARF. And "pushl %esi" saves the callee-saved %esi register, which also needs
to be specified in DWARF.

Before, all of this logic was in one method. This didn't work too well, because
as you can see there are multiple FDE line entries that need to be created.

This fix creates the "MachineMove" objects directly when they're needed; instead
of waiting until the end, and losing information.

llvm-svn: 74952
2009-07-07 21:53:07 +00:00
Owen Anderson 8ec8c97f81 LLVMContext-ifiy the implementation of the C API.
llvm-svn: 74950
2009-07-07 21:33:58 +00:00
Devang Patel 270d747359 Remove dead code.
llvm-svn: 74949
2009-07-07 21:12:32 +00:00
Owen Anderson fac7b59579 LLVM Context-ification.
llvm-svn: 74948
2009-07-07 21:07:14 +00:00
Dan Gohman ab84a6ec1e Fix a typo and a grammaro in a comment.
llvm-svn: 74947
2009-07-07 20:47:48 +00:00
Evan Cheng d0611f9a37 Add Thumb2 movcc instructions.
llvm-svn: 74946
2009-07-07 20:39:03 +00:00
Evan Cheng 39d8075edc Add missing tests.
llvm-svn: 74945
2009-07-07 20:38:08 +00:00
Chris Lattner a1e11f530e Implement parsing support for the .comm directive. Patch by
Kevin Enderby!

llvm-svn: 74944
2009-07-07 20:30:46 +00:00
Owen Anderson e9f9804762 LLVMContext-ify the bitcode reader.
llvm-svn: 74942
2009-07-07 20:18:58 +00:00
Dan Gohman 628af7a4bc Add a paragraph about the Add->FAdd API change.
llvm-svn: 74941
2009-07-07 20:05:15 +00:00
Evan Cheng 02a44edf12 Add BX and BXr9 encodings. Patch by Sean Callanan.
llvm-svn: 74938
2009-07-07 19:16:24 +00:00
Mike Stump 54731d5cde Fix build.
llvm-svn: 74936
2009-07-07 18:52:14 +00:00
Owen Anderson 32bc1e1a3b Use LLVMContext in the LLLexer.
llvm-svn: 74934
2009-07-07 18:44:11 +00:00
Chris Lattner 19032f3206 fix a bug in post-order iterators with external storage, patch by
Olaf Krzikalla!

llvm-svn: 74933
2009-07-07 18:43:48 +00:00
Chris Lattner a8b6961b6c fix some type confusion in ReadVBR64: "Piece" should be only 32 bits,
not 64, because we read at most 32 bits at a time.  OTOH, "Result" must
be 64-bits and insertion into it must be 64-bit clean.  Thanks to Ivan
Sorokin for bringing this up.

llvm-svn: 74932
2009-07-07 18:39:49 +00:00
Owen Anderson 5c96ef7c4e Have scoped mutexes take referenes instead of pointers.
llvm-svn: 74931
2009-07-07 18:33:04 +00:00
Chris Lattner f840ed7ed4 Fix lli to print an error and exit when EE returns null but no string. Patch
by Eric Rannaud!

llvm-svn: 74930
2009-07-07 18:31:09 +00:00
Chris Lattner 72a743fc47 "BinaryObject.h was implicitly converting between uint{16,32,64}_t to
uint8_t (via 'foo & 255'), i replaced this with an explicit (uint8_t)
cast which is equivalent, faster and more correct (silences
type-related warnings). Also, following coding standards I replaced
post-increment with pre-increment."

Patch by Ryan Flynn!

llvm-svn: 74929
2009-07-07 18:28:00 +00:00
Bill Wendling e446053099 Remove unused parameter.
llvm-svn: 74928
2009-07-07 18:21:19 +00:00
Chris Lattner 3612256e2e Eliminate the static constructors and locks from DynamicLibrary.cpp.
This fixes PR4512 and eliminating static ctors is always good.  Losing
thread safety is unfortunate, but the code is just incredibly poorly
designed.

If someone is interested, the "right" solution is to split
DynamicLibrary.cpp into two separate pieces: a stateless piece in
libsystem, and a simple support file in libsupport that has the
"state" (e.g.  AddSymbol) in managed static objects.

Doing this would both fix memory leaks we already have, as well as make
the code thread safe again.  it would also make sense to move all the
unix specific code in System/DynamicLibrary.cpp into 
System/Unix/DynamicLibrary.inc.

llvm-svn: 74927
2009-07-07 18:17:07 +00:00
Chris Lattner 5ceb2cb005 remove dead code, noone creates instances of "DynamicLibrary", so the ctor and dtor are dead.
llvm-svn: 74926
2009-07-07 18:01:58 +00:00
Evan Cheng 0878f15fa1 Revert 74898. It broke several tests.
llvm-svn: 74925
2009-07-07 17:50:43 +00:00
Chris Lattner 4efb280fb0 we don't use libtool anymore, update comments.
llvm-svn: 74924
2009-07-07 17:50:11 +00:00
Torok Edwin 973c214ce0 Fix braces.
llvm-svn: 74923
2009-07-07 17:39:53 +00:00
Torok Edwin 6c2d233e7a Introduce new error handling API.
This will replace exit()/abort() style error handling with an API
that allows clients to register custom error handling hooks.
The default is to call exit(1) when no error handler is provided.

llvm-svn: 74922
2009-07-07 17:32:34 +00:00
Owen Anderson 9e2af02143 Re-LLVMContext-ize DebugInfo, now with less breakage.
llvm-svn: 74920
2009-07-07 17:12:53 +00:00
Dan Gohman af75234955 Change all SCEV* to SCEV *.
llvm-svn: 74918
2009-07-07 17:06:11 +00:00
Owen Anderson 5723bd43d3 This parameter should default to true, not false.
llvm-svn: 74915
2009-07-07 16:56:05 +00:00
Mikhail Glushenkov ff4718b0a1 Regenerate.
llvm-svn: 74914
2009-07-07 16:44:20 +00:00
Mikhail Glushenkov 2512c2a1f6 Documentation update.
llvm-svn: 74913
2009-07-07 16:43:49 +00:00
Mikhail Glushenkov 244821fbe5 Show how to modify built-in options.
Sanjiv complained about the need to maintain local changes to
lib/CompilerDriver.

llvm-svn: 74912
2009-07-07 16:39:33 +00:00
Owen Anderson 4f3675ca73 Revert part of r74873 that broke Clang's debug info generation.
llvm-svn: 74910
2009-07-07 16:31:25 +00:00
Mikhail Glushenkov 54751921ca Regenerate.
llvm-svn: 74908
2009-07-07 16:09:48 +00:00
Mikhail Glushenkov f4cc0cddbc Documentation update.
llvm-svn: 74907
2009-07-07 16:09:29 +00:00
Mikhail Glushenkov 5d458e0f06 s/llvmc2/llvmc/
llvm-svn: 74906
2009-07-07 16:09:05 +00:00
Mikhail Glushenkov b0df5047e5 Add an 'init' option property.
Makes possible to provide default values for options defined in plugins (same as
cl::init).

llvm-svn: 74905
2009-07-07 16:08:41 +00:00
Mikhail Glushenkov 182512b403 Refactoring.
Make isList(), isSwitch() and isParameter() member functions of
OptionDescription.

llvm-svn: 74904
2009-07-07 16:08:11 +00:00
Mikhail Glushenkov 2de4161b23 Comment fix.
llvm-svn: 74903
2009-07-07 16:07:36 +00:00
Sanjiv Gupta 031bbef528 if the terminator is a branch depending upon the side effects of a
previous cmp; a copy can not be inserted here if the copy insn also has
 side effects. We don't have access to the attributes of copy insn here;
 so just play safe by finding a safe locations for branch terminators.

llvm-svn: 74898
2009-07-07 08:04:51 +00:00
Evan Cheng d0f6324cdc Add Thumb2 pkhbt / pkhtb.
llvm-svn: 74895
2009-07-07 05:35:52 +00:00
Evan Cheng b24e51e2d9 Add some more Thumb2 multiplication instructions.
llvm-svn: 74889
2009-07-07 01:17:28 +00:00
Evan Cheng 7c9434399d 80 col violation.
llvm-svn: 74888
2009-07-07 01:16:41 +00:00
Dale Johannesen 56a53d02e1 Don't accept globals as matching 'i' constraint
in PIC modes (in accordance with existing comment).
gcc.apple/asm-block-25.c

llvm-svn: 74886
2009-07-07 00:18:49 +00:00
Devang Patel 446bff93f5 Add isMetadata() to check metadata operand.
llvm-svn: 74883
2009-07-06 23:46:02 +00:00
Devang Patel 5832e7fd23 Add new ValueType for metadata.
llvm-svn: 74882
2009-07-06 23:44:32 +00:00
Devang Patel 78b7c1bfe7 !"i" is a valid MDString.
llvm-svn: 74881
2009-07-06 23:40:48 +00:00
Devang Patel 8e8028eac3 Avoid directly relying on llvm.dbg.compile_unit and llvm.dbg.global_variables.
PIC16 developers, please verify. Thanks.

llvm-svn: 74880
2009-07-06 23:28:36 +00:00
Devang Patel c4744b9e22 Add FIXMEs.
llvm-svn: 74879
2009-07-06 23:11:08 +00:00
Owen Anderson 38264b1554 "LLVMContext* " --> "LLVMContext *"
llvm-svn: 74878
2009-07-06 23:00:19 +00:00
Owen Anderson f1f1743b2e Finish LLVMContext-ing lib/Analysis. This required pushing LLVMContext's through the ValueTracking API.
llvm-svn: 74873
2009-07-06 22:37:39 +00:00
Evan Cheng 3d8ccdb4be isThumb2 really should mean thumb2 only, not thumb2+.
llvm-svn: 74871
2009-07-06 22:29:14 +00:00
Evan Cheng 40398233b7 Add bfc to armv6t2.
llvm-svn: 74868
2009-07-06 22:23:46 +00:00
Evan Cheng e63b0e6f79 Added ARM::mls for armv6t2.
llvm-svn: 74866
2009-07-06 22:05:45 +00:00
Evan Cheng ba2410b7ca Avoid adding a duplicate def. This fixes PR4478.
llvm-svn: 74857
2009-07-06 21:34:05 +00:00
Owen Anderson 2370b4d81f No need to double-include config.h
llvm-svn: 74854
2009-07-06 21:24:37 +00:00
Owen Anderson 1d182d08ba We need to include config.h to get the proper setting to LLVM_MULTITHREADED.
Patch by Xerxes Ranby.

llvm-svn: 74846
2009-07-06 18:50:47 +00:00
Owen Anderson 39f00cc1d4 Thread LLVMContext through the constant folding APIs, which touches a lot of files.
llvm-svn: 74844
2009-07-06 18:42:36 +00:00
Misha Brukman 0774820306 * Allow skipping parts of the installation to be able to do it in parts if one
phase fails and the user wants to reinstall one of the components.
* Fixed LLVM-GCC configuration flags: s/--with-gnu-{as,ld}/--with-{as,ld}/
  The former is a boolean flag, the latter is a flag that takes a path.
* Added a new flag CROSS_MARCH, defaults to armv6.

llvm-svn: 74840
2009-07-06 18:29:03 +00:00
Sanjiv Gupta 0a1e2787a0 pic16 doesn't have a Data64bitsDirective. Set it NULL explicitly to tell the generic code to not pick the default.
llvm-svn: 74839
2009-07-06 18:09:11 +00:00
Sanjiv Gupta cf5ea6c26f pic16 isn't ready to handle llvm.metadata yet.
llvm-svn: 74838
2009-07-06 18:07:06 +00:00
Chris Lattner 7f31824a44 Add two new accessors to the C bindings, patch by Wladimir van der Laan!
llvm-svn: 74836
2009-07-06 17:29:59 +00:00
Chris Lattner 738cc28f4d improve portability to windows, patch by Xerces Ranby!
llvm-svn: 74835
2009-07-06 17:24:48 +00:00
Jeffrey Yasskin 5a2e52182a Oops, I #included errno.h from inside the llvm::sys namespace.
llvm-svn: 74834
2009-07-06 16:50:27 +00:00
Stuart Hastings e1cd1b5d2a Mark this test as Darwin only. Patch by Bill Wendling.
llvm-svn: 74829
2009-07-06 15:36:23 +00:00
Duncan Sands ef86842ca2 Fix the cmake build - patch by Xerxes Rånby.
llvm-svn: 74825
2009-07-06 14:28:32 +00:00
Sanjiv Gupta a0396d9013 Reverting back the changes checked-in accidently.
llvm-svn: 74823
2009-07-06 10:34:10 +00:00
Sanjiv Gupta b89d3db1fd Implement _CONFIG macro to allow users to se to configuration settings on the part.
Implement _section macro to allow users to place objects in specific sections.
Implement _address macro to allow users to place objects at a particular address.
Placing objects at a memory address:
crate a unique section name from varname, address, object type and put that section at specified address. Mark this section a full (size = banksize) so that other objects do not compete for it while placing objects to sections in AsmPrinter.

llvm-svn: 74822
2009-07-06 10:18:37 +00:00
Bruno Cardoso Lopes f539f03289 Changed ELFCodeEmitter to inherit from ObjectCodeEmitter
llvm-svn: 74821
2009-07-06 09:26:48 +00:00
Sanjiv Gupta 5d569c563d Corrected the names description. Change in a comment. No functionality change.
llvm-svn: 74819
2009-07-06 08:22:15 +00:00
Bruno Cardoso Lopes 3527ccdac8 Cleanup MachO writer and code emitter. Fix 80 cols problems, remove extra spaces, shrink down includes and move some methods out-of-line
llvm-svn: 74817
2009-07-06 06:40:51 +00:00
Bruno Cardoso Lopes 765655535a Just forgot to include the two new files
llvm-svn: 74814
2009-07-06 05:16:40 +00:00
Bruno Cardoso Lopes 5661ea68e7 Add the Object Code Emitter class. Original patch by Aaron Gray, I did some
cleanup, removed some #includes and moved Object Code Emitter out-of-line.

llvm-svn: 74813
2009-07-06 05:09:34 +00:00
Owen Anderson 605a8c743f More LLVMContext-ification.
llvm-svn: 74811
2009-07-06 01:34:54 +00:00
Oscar Fuentes c296b89d51 CMake: Fixes previous change: CMAKE_BUILD_TYPE is unknown when
generating project files for MSVC.

llvm-svn: 74809
2009-07-05 23:58:20 +00:00
Owen Anderson e70b637033 More LLVMContext-ification.
llvm-svn: 74807
2009-07-05 22:41:43 +00:00
Nick Lewycky d687b0380c There are five floating point types.
llvm-svn: 74806
2009-07-05 22:35:49 +00:00
Nick Lewycky 4f8d9eeadc There are *four* lights!
llvm-svn: 74804
2009-07-05 22:23:28 +00:00
Oscar Fuentes 5674531255 CMake: Avoids defining _DEBUG on MSVC Release builds. Fixes PR 4379.
llvm-svn: 74794
2009-07-05 18:43:52 +00:00
Duncan Sands 78cd3e5472 Clarify that later compiler versions are known to
fail to build the Ada front-end.

llvm-svn: 74793
2009-07-05 12:01:44 +00:00
Nick Lewycky 3292908132 When comparing constants, consider a less wide constant to be "less complex"
than a wider one, before trying to compare their contents which will crash
if their sizes are different.

llvm-svn: 74792
2009-07-04 17:24:52 +00:00
Jeffrey Yasskin ca6d224d71 Have cmake define HAVE_STRERROR and friends to 1 when they're defined at all.
llvm-svn: 74791
2009-07-04 16:37:12 +00:00
Mikhail Glushenkov 4f0fa1539c Make -save-temps=obj play better with -o.
Use only the *dirname* of the pathname given to -o, so that -o can still be used
to name the output executable. This is more like what GCC 4.5 does.

llvm-svn: 74790
2009-07-04 14:23:32 +00:00
Mikhail Glushenkov 9297a52715 Regenerate.
llvm-svn: 74789
2009-07-04 14:23:08 +00:00
Mikhail Glushenkov 95bac6f77c LLVMC can be now compiled w/o dynamic plugin support.
Controlled via the --enable-llvmc-dynamic-plugins option.

llvm-svn: 74784
2009-07-04 03:55:25 +00:00
Mikhail Glushenkov 29d06ea46c LLVMC doesn't need ENABLE_PIC to build now.
llvm-svn: 74783
2009-07-04 03:54:54 +00:00
Mike Stump bbd8707f6e Fix build.
llvm-svn: 74782
2009-07-03 22:11:58 +00:00
Owen Anderson 340288c621 Even more passes being LLVMContext'd.
llvm-svn: 74781
2009-07-03 19:42:02 +00:00
Nick Lewycky cb23509546 Add Static Single Information construction pass written by André Tavares!
Use it by requiring it through the pass manager, then calling its createSSI
method on the variables that you want in SSI form.

llvm-svn: 74780
2009-07-03 19:28:36 +00:00
Duncan Sands cac07a4cb7 Silence a warning when assertions are turned off.
llvm-svn: 74779
2009-07-03 16:11:59 +00:00
Duncan Sands c3f89b3fbb Silence a warning when assertions are turned off.
llvm-svn: 74778
2009-07-03 16:11:34 +00:00
Duncan Sands 075276e9ce Silence warning when building without assertions.
llvm-svn: 74777
2009-07-03 16:06:07 +00:00
Duncan Sands 5a16986cfc Silence warnings when assertions are turned off.
llvm-svn: 74776
2009-07-03 16:03:33 +00:00
Duncan Sands ca5303fd1c In this unreachable code, return an initialized value.
This stops gcc warning about possible uses of an uninitialized
value when compiling with assertions turned off.

llvm-svn: 74775
2009-07-03 16:00:23 +00:00
Duncan Sands 31554aba47 Add newline at end of file.
llvm-svn: 74774
2009-07-03 15:38:01 +00:00
Duncan Sands 29c8efce31 Add newline at end of file.
llvm-svn: 74773
2009-07-03 15:30:58 +00:00
Torok Edwin f011f28767 Fix typo: intepreter->interpreter.
llvm-svn: 74770
2009-07-03 12:11:32 +00:00
Duncan Sands f1fb654eb3 Fix the build: provide uint8_t.
llvm-svn: 74769
2009-07-03 08:12:51 +00:00
Sanjiv Gupta a587ffe12d For extended loads of type i1 to i8, we will need to at least one byte from memory.
The change in the .td file is to mark the side effects of mov insn.

llvm-svn: 74768
2009-07-03 07:58:59 +00:00
Tilmann Scheller 9db3e70056 Various small changes related to the Condition Register on PowerPC.
Don't spill to the CR save area when using the SVR4 ABI for now.
Don't rely on constants assigned for registers to be in order (they aren't assigned in order).
Make sure CR bits are mapped to the corresponding CR field.

llvm-svn: 74767
2009-07-03 06:47:55 +00:00
Tilmann Scheller 773f14c008 Refactor ABI code in the PowerPC backend.
Make CalculateParameterAndLinkageAreaSize() Darwin-specific.
Remove SVR4 specific code from LowerCALL_Darwin() and LowerFORMAL_ARGUMENTS_Darwin().
Rename MachoABI to DarwinABI for consistency.
Rename ELF ABI to SVR4 ABI for consistency.
Factor out common call return lowering between the Darwin and SVR4 ABI.
Factor out common call lowering between the Darwin and SVR4 ABI.

llvm-svn: 74766
2009-07-03 06:47:08 +00:00
Tilmann Scheller b93960d779 Implement the SVR4 ABI for PowerPC.
Implement LowerFORMAL_ARGUMENTS_SVR4().
Implement LowerCALL_SVR4().
Add support for split arguments.
Implement by value parameter passing for aggregates.
Add support for variable argument lists.
Create the spill area for argument registers of variable argument functions no longer at a fixed offset.
Make sure callee saved registers are spilled to the correct stack offsets.
Change allocation order of non-volatile floating-point registers.
Add VRSAVE to the list of callee-saved registers, add CallConvLowering for vararg calls.
Add support for variable argument calls with Vector arguments.
Add support for VR and VRSAVE save area, improve allocation order for non-volatile vector registers.
Stop creating illegal i8 values in LowerVASTART().
Add memory access width hints.
Make sure to reserve space on the stack for the frame pointer.
When using the SVR4 ABI, reserve r13 for the Small Data Area pointer.
Assure that the frame pointer is spilled to the correct location on the stack.
Some FP registers were not marked as volatile.
Make sure the i64 words from a long double are passed either both in registers or both on the stack.
Only put integer arguments in registers which are not marked with the inreg flag.

llvm-svn: 74765
2009-07-03 06:45:56 +00:00
Tilmann Scheller aea6059ed4 Add NumFixedArgs attribute to CallSDNode which indicates the number of fixed arguments in a vararg call.
With the SVR4 ABI on PowerPC, vector arguments for vararg calls are passed differently depending on whether they are a fixed or a variable argument. Variable vector arguments always go into memory, fixed vector arguments are put 
into vector registers. If there are no free vector registers available, fixed vector arguments are put on the stack.

The NumFixedArgs attribute allows to decide for an argument in a vararg call whether it belongs to the fixed or variable portion of the parameter list.

llvm-svn: 74764
2009-07-03 06:44:53 +00:00
Tilmann Scheller 98bdaaa3ee Small cleanups in the PowerPC backend.
Small refactoring in LowerFORMAL_ARGUMENTS().
Correct minor formatting issues.
Remove size argument of CreateCopyOfByValArgument().
Remove dead argument from CalculateStackSlotSize().
Remove unused variable ReturnAddrIndex from various targets.

llvm-svn: 74763
2009-07-03 06:43:35 +00:00
Bruno Cardoso Lopes 95dd8657ca Factor some code out and support for Jump Table relocations
llvm-svn: 74760
2009-07-03 04:36:26 +00:00
Mikhail Glushenkov d6c39ae68c Add --enable-llvmc-dynamic configure option.
Controls whether libCompilerDriver should be loaded dynamically. By default this
is needed only on Win32, to make dynamic plugins work.

llvm-svn: 74759
2009-07-03 03:52:47 +00:00
Mikhail Glushenkov d871cbcd5b Trailing whitespace.
llvm-svn: 74758
2009-07-03 03:52:07 +00:00
Evan Cheng 0e8bde5910 Add thumb2 sign / zero extend with rotate instructions.
llvm-svn: 74755
2009-07-03 01:43:10 +00:00
Andreas Bolka 1cd3fd6336 Minor improvement to the LDA debug output.
llvm-svn: 74754
2009-07-03 01:42:52 +00:00
Owen Anderson 80baed63b4 Second batch of passes using LLVMContext.
llvm-svn: 74753
2009-07-03 00:54:20 +00:00
Evan Cheng 6d9041100b Add Thumb2 load / store multiple instructions. Not used yet.
llvm-svn: 74749
2009-07-03 00:18:36 +00:00
Owen Anderson b5618da226 Convert the first batch of passes to use LLVMContext.
llvm-svn: 74748
2009-07-03 00:17:18 +00:00
Daniel Dunbar 38a22bffdc Replace std::iostreams with raw_ostream in TableGen.
- Sorry, I can't help myself.

 - No intended functionality change.

llvm-svn: 74742
2009-07-03 00:10:29 +00:00
Evan Cheng f30ee8820a t2LDR_PRE etc are loads.
llvm-svn: 74741
2009-07-03 00:08:19 +00:00
Evan Cheng 53cdf022b6 Added indexed stores.
llvm-svn: 74740
2009-07-03 00:06:39 +00:00
Owen Anderson 39a7aed050 Fill in a few more missing accessors.
llvm-svn: 74739
2009-07-02 23:58:19 +00:00
Evan Cheng 8ecd7eb3f7 Sign extending pre/post indexed loads.
llvm-svn: 74736
2009-07-02 23:16:11 +00:00
Chris Lattner 200e0757c7 switch the .ll parser to use SourceMgr.
llvm-svn: 74735
2009-07-02 23:08:13 +00:00
Chris Lattner a76611a535 switch the .ll parser into SMDiagnostic.
llvm-svn: 74734
2009-07-02 22:46:18 +00:00
Devang Patel 87127712b9 Simplify debug info intrisinc lowering.
llvm-svn: 74733
2009-07-02 22:43:26 +00:00
Chris Lattner cc64cc9313 add an explicit class for holding llvm::SourceMgr diagnostics and use
it to print them.  This gives us column numbers in the diag line.  Before:

t.s:4: error: unexpected token in argument list
 mov %eax %edx
          ^

now:
t.s:4:11: error: unexpected token in argument list
 mov %eax %edx
          ^

llvm-svn: 74732
2009-07-02 22:24:20 +00:00
David Goodwin ade05a37f1 Checkpoint refactoring of ThumbInstrInfo and ThumbRegisterInfo into Thumb1InstrInfo, Thumb2InstrInfo, Thumb1RegisterInfo and Thumb2RegisterInfo. Move methods from ARMInstrInfo to ARMBaseInstrInfo to prepare for sharing with Thumb2.
llvm-svn: 74731
2009-07-02 22:18:33 +00:00
Chris Lattner 73f3611be9 implement error recovery in the llvm-mc parser. Feel the power!
llvm-svn: 74728
2009-07-02 21:53:43 +00:00
Owen Anderson 7c5c11f87d Make the current LLVMContext available to passes.
llvm-svn: 74724
2009-07-02 20:23:41 +00:00
Douglas Gregor 6141511621 CMake build fixes, from Xerxes Ranby
llvm-svn: 74720
2009-07-02 18:53:52 +00:00
Bruno Cardoso Lopes 6dca2847d9 shrinking down #includes
llvm-svn: 74718
2009-07-02 18:29:24 +00:00
Owen Anderson 0a2c458ae0 Add an accessor to Function so that Passes can easily get access to the context.
llvm-svn: 74714
2009-07-02 18:03:58 +00:00
Sanjiv Gupta 6c41ac5b38 Prefix bin dir to executables.
llvm-svn: 74713
2009-07-02 17:51:09 +00:00
Devang Patel 676efa092c Remove tabs.
llvm-svn: 74712
2009-07-02 17:39:40 +00:00
Sanjiv Gupta 2b65d1aac1 Fixed handling of -c option.wq
llvm-svn: 74711
2009-07-02 17:35:38 +00:00
Owen Anderson ac7334c1cf Use LLVMContext for generating MDStrings too.
llvm-svn: 74710
2009-07-02 17:28:30 +00:00
Owen Anderson 29ec3e0e50 Use LLVMContext to generate metadata constants.
llvm-svn: 74708
2009-07-02 17:20:28 +00:00
Owen Anderson fea7ae88c9 Add accessors for metadata constants.
llvm-svn: 74707
2009-07-02 17:19:47 +00:00
Devang Patel 526b17097a Fix typo.
Thanks Duncan!

llvm-svn: 74706
2009-07-02 17:17:03 +00:00
Owen Anderson e792c90fd1 Add accessor for MDNode.
llvm-svn: 74705
2009-07-02 17:12:48 +00:00
Owen Anderson 09063cec4e Use LLVMContext for generating UndefValue constants too!
llvm-svn: 74703
2009-07-02 17:04:01 +00:00
Owen Anderson f85afb2591 Add accessor for getting UndefValue's.
llvm-svn: 74702
2009-07-02 16:51:51 +00:00
Owen Anderson 6b92174dda Describe the LLVMContext API change.
llvm-svn: 74701
2009-07-02 16:48:38 +00:00
Chris Lattner ccfb5105eb simplify some logic by using isWeakForLinker(). Thanks to Anton for
pointing this out.

llvm-svn: 74700
2009-07-02 16:08:53 +00:00
Chris Lattner edb8407f0c do not try to analyze bitcasts from i64 to <2 x i32> in ComputedMaskedBits. While
we could do this, doing so requires adjusting the demanded mask and the code isn't 
doing that yet.  This fixes PR4495

llvm-svn: 74699
2009-07-02 16:04:08 +00:00
Chris Lattner f3f6aaa2c3 fix inverted logic pointed out by John McCall, noticed by inspection.
This was considering vector intrinsics to have cost 2, but non-vector
intrinsics to have cost 1, which is backward.

llvm-svn: 74698
2009-07-02 15:39:39 +00:00
Duncan Sands f9cf4ffcc7 Fix windows build, patch by Howard Su.
llvm-svn: 74697
2009-07-02 12:09:50 +00:00
Evan Cheng 84c6cda2ef Thumb2 pre/post indexed loads.
llvm-svn: 74696
2009-07-02 07:28:31 +00:00
Owen Anderson 2de0067e60 Ack, missed one incompatibility.
llvm-svn: 74695
2009-07-02 07:21:49 +00:00
Owen Anderson 31d44e4904 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.

llvm-svn: 74694
2009-07-02 07:17:57 +00:00
Evan Cheng 844f0b4562 80 col violation.
llvm-svn: 74693
2009-07-02 06:44:30 +00:00