Commit Graph

8734 Commits

Author SHA1 Message Date
Bill Wendling
527b6e6292 Temporarily revert r74494. It was causing failures in the unit tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74515 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30 07:05:27 +00:00
Owen Anderson
5ec56cc438 Fix the build on Cygwin. Patch by Aaron Gray.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74510 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30 05:33:46 +00:00
Daniel Dunbar
15d1707096 llvm-mc: Evaluation for relocatable expressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74496 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30 01:49:52 +00:00
Dan Gohman
9b27622ecb Delete a spurious blank line at the top of the file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74495 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30 01:29:09 +00:00
Dan Gohman
670031666c Define an operator<< for APInt to be used with std::ostream.
This will allow it to be used in unittests that use gtest's
EXPECT_EQ.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74494 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30 01:28:08 +00:00
Daniel Dunbar
3fb7683bec Normalize SourceMgr messages.
- Don't print "Parsing" in front of every message.

 - Take additional "type" argument which is prepended to the message (with ": ")
   if given.

 - Update clients to print errors (warnings) as:
<filename>:<line number>: error(warning): ...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74489 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30 00:49:23 +00:00
Owen Anderson
2bc29dc0bc Add LLVMContext, which will eventually be used as a container for privatizing a lot of (currently) global state, including the
constant and type uniquing tables.  For now, just make it a wrapper around the existing APIs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74488 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30 00:48:55 +00:00
Mikhail Glushenkov
583cf31973 Move the driver entry point out of Main.inc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74482 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30 00:15:24 +00:00
Daniel Dunbar
c29dfa786a llvm-mc: Parse .{,b,p2}align{,w,l} directives.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74478 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-29 23:46:59 +00:00
Daniel Dunbar
dce0f3c556 llvm-mc: Diagnose misuse (mix) of defined symbols and labels.
- For example, we diagnose errors on:
--
a:
a = 10
--

 - For now we reject code like:
--
.long a
a = 10
--
   which "as" accepts (on Darwin).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74476 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-29 23:43:14 +00:00
Daniel Dunbar
9146d0e89c Add SMLoc::isValid method.
- To support using SMLoc as a sentinel.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74474 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-29 23:28:55 +00:00
Daniel Dunbar
7908a6a189 Rename MCValue::getCst to getConstant and add MCValue::isConstant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74440 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-29 19:51:00 +00:00
Sebastian Redl
37c286c181 Fix three MSVC 2008 warnings that completely clutter the build output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74430 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-29 17:12:06 +00:00
David Greene
9b9838dbd4 Add more vector ValueTypes for AVX and other extended vector instruction
sets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74427 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-29 16:47:10 +00:00
Duncan Sands
cd1267d2d6 Add triple for OpenBSD.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74422 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-29 13:36:13 +00:00
Mikhail Glushenkov
95c1f5ba64 Make dynamic LLVMC plugins work on Windows (finally!).
Implemented by making lib/CompilerDriver a shared library that holds all the
global static data (CommandLine options, plugin registry) that we unfortunately
have to live with.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74417 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-29 03:09:15 +00:00
Andreas Bolka
f35626d3cd Minimal LDA interface, maximally conservative tester.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74401 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-28 00:21:21 +00:00
Andreas Bolka
707207adae LDA analysis output scaffolding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74400 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-28 00:16:08 +00:00
Dan Gohman
4b35f83b91 Teach LoopSimplify how to merge multiple loop exits into a single exit,
when one of them can be converted to a trivial icmp and conditional
branch.

This addresses what is essentially a phase ordering problem.
SimplifyCFG knows how to do this transformation, but it doesn't do so
if the primary block has any instructions in it other than an icmp and
a branch. In the given testcase, the block contains other instructions,
however they are loop-invariant and can be hoisted. SimplifyCFG doesn't
have LoopInfo though, so it can't hoist them. And, it's important that
the blocks be merged before LoopRotation, as it doesn't support
multiple-exit loops.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74396 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-27 21:30:38 +00:00
Dan Gohman
9d59d9f849 Eliminate a layer of indirection in LoopInfo and MachineLoopInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74394 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-27 21:22:48 +00:00
Dan Gohman
1c34375f79 Convert ScalarEvolution to use BumpPtrAllocator and FoldingSet, instead
of a team of individual allocations and a team of std::maps.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74393 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-27 21:21:31 +00:00
Dan Gohman
0a928335fa Remove a redundant #include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74392 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-27 21:18:51 +00:00
Dan Gohman
267a385342 Change SCEVExpander to use an IRBuilder to emit instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74391 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-27 21:18:18 +00:00
Dan Gohman
1d3b26ac02 Add a 'const' in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74389 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-27 20:53:16 +00:00
Dan Gohman
667d787c0a Incorporate the insertion point into the key of SCEVExpander's CSE map.
This helps it avoid reusing an instruction that doesn't dominate all
of the users, in cases where the original instruction was inserted
before all of the users were known.  This may result in redundant
expansions of sub-expressions that depend on loop-unpredictable values
in some cases, however this isn't very common, and it primarily impacts
IndVarSimplify, so GVN can be expected to clean these up.

This eliminates the need for IndVarSimplify's FixUsesBeforeDefs,
which fixes several bugs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74352 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-26 22:53:46 +00:00
Devang Patel
acec7b35aa Remove unused routines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74351 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-26 22:53:22 +00:00
Bob Wilson
ff0d3392e0 Add missing argument for vtbx intrinsic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74340 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-26 22:27:22 +00:00
Bob Wilson
fd6d87d68a Add intrinsics for ARM NEON vtbl and vtbx operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74333 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-26 21:45:05 +00:00
Chris Lattner
505e982040 fix a really subtle bug in the cross section of aliases and TLS:
the SelectionDAG::getGlobalAddress function properly looks through
aliases to determine thread-localness, but then passes the GV* down
to GlobalAddressSDNode::GlobalAddressSDNode which does not.  Instead
of passing down isTarget, just pass down the predetermined node
opcode.  This fixes some assertions with out of tree changes I'm 
working on.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74325 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-26 21:14:05 +00:00
Jeffrey Yasskin
d8ac1be686 Delete LoopPass::runOnFunctionBody. It was never used or implemented.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74320 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-26 20:42:50 +00:00
Owen Anderson
b41b5e0b2d Get rid of these cache variables, which are a holdover from the days when
we had multiple type planes and these lookups were expensive.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74319 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-26 20:33:47 +00:00
Bob Wilson
4dbbfe3571 Swap order of arguments to vst[34]* intrinsics. This matches the order
used by both the user-visible intrinsics defined by ARM and the
corresponding GCC builtins.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74300 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-26 18:23:29 +00:00
Douglas Gregor
c7077c7015 CMake: add configure checks for pthread_rwlock_init and pthread_getspecific
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74284 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-26 14:35:43 +00:00
Devang Patel
e2f9382c72 Remove unnecessary includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74254 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-26 02:25:46 +00:00
Devang Patel
13e16b65dd Remove debug info anchors - llvm.dbg.compile_units, llvm.dbg.subprograms
and llvm.dbg.global_variables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74251 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-26 01:49:18 +00:00
Owen Anderson
438d3946af Add support for const thread locals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74226 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-25 23:31:18 +00:00
Owen Anderson
27fcfe1364 Add a configure test for pthread_getspecific, and use it when building ThreadLocal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74222 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-25 23:10:26 +00:00
Owen Anderson
4a28522c1a Add a class for supporting platform independent thread-local storage.
Windows people, please double-check/patch this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74209 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-25 21:58:01 +00:00
Chris Lattner
f5a5546f43 add targetflags to jump tables and constant pool entries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74204 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-25 21:35:31 +00:00
Chris Lattner
2a4ed82ce2 allow setting target operand flags on TargetGlobalAddress nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74203 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-25 21:21:14 +00:00
Chris Lattner
1af2231da6 start bringing targetoperand flags into isel, first up, ExternalSymbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74199 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-25 18:45:50 +00:00
Mikhail Glushenkov
7defa2d3d5 Make -save-temps behave like in GCC 4.5.
The -save-temps option now behaves like described in GCC 4.5 release notes
(you can specify output directory for temporary files with -save-temps=obj
-o $DIRNAME). I do not have GCC 4.5 installed, so if there are any
inconsistencies between llvmc and GCC in the implementation of this
feature, please let me know.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74190 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-25 18:20:10 +00:00
Chris Lattner
b1fb84dee9 just eliminate the code entirely!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74183 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-25 17:28:07 +00:00
Chris Lattner
d5899793a6 Clone target flags when copying mbb operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74181 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-25 17:21:32 +00:00
Owen Anderson
a8dbf36f3f Privatize some more debug-related static data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74179 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-25 16:55:32 +00:00
Sanjiv Gupta
8ebd4b6422 Identify unconditional gotos and generate a page sel instructions before them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74172 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-25 11:03:14 +00:00
Jeffrey Yasskin
df5a7daff9 Add a JITEventListener interface that gets called back when a new function is
emitted or the machine code for a function is freed.  Chris mentioned that we
may also want a notification when a stub is emitted, but that'll be a future
change.  I intend to use this to tell oprofile where functions are emitted and
what lines correspond to what addresses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74157 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-25 02:04:04 +00:00
Chris Lattner
9a96c425db ad MachineInstrBuilder support for target flags on operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74155 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-25 01:16:22 +00:00
Dan Gohman
a278f3f552 Add a getUniqueExitBlock utility function, similar to getExitBlock,
but for getUniqueExitBlocks.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74145 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-25 00:09:57 +00:00
Owen Anderson
6279cd85e9 Now with EVEN FEWER statics!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74143 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-25 00:04:15 +00:00