Devang Patel
70df97ecc7
Add machine operand for MDNodes. This will be used to communicate debug info.
...
llvm-svn: 74628
2009-07-01 19:08:07 +00:00
Bill Wendling
fdd5badace
Update comments to make it clear that the function alignment is the Log2 of the
...
bytes and not bytes.
llvm-svn: 74624
2009-07-01 18:50:55 +00:00
Jeffrey Yasskin
0a952c6541
Update configure and config.h.in from r74621.
...
llvm-svn: 74623
2009-07-01 18:30:10 +00:00
Jeffrey Yasskin
29ea777c1e
Add a portable strerror*() wrapper, llvm::sys::StrError(). This includes the
...
Windows variant, strerror_s, but I couldn't test that.
I'll update configure and config.h.in in a subsequent patch.
llvm-svn: 74621
2009-07-01 18:11:20 +00:00
Misha Brukman
ff83cd632a
Use correct format for LLVM header #includes.
...
llvm-svn: 74620
2009-07-01 17:51:56 +00:00
Owen Anderson
81b8dabb53
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.
llvm-svn: 74614
2009-07-01 16:58:40 +00:00
Evan Cheng
7d78cb531e
Remove special handling of implicit_def. Fix a couple more bugs in liveintervalanalysis and coalescer handling of implicit_def.
...
Note, isUndef marker must be placed even on implicit_def def operand or else the scavenger will not ignore it. This is necessary because -O0 path does not use liveintervalanalysis, it treats implicit_def just like any other def.
llvm-svn: 74601
2009-07-01 08:19:36 +00:00
Daniel Dunbar
cf4aa8ff97
Tweak MCSymbol doxyments.
...
llvm-svn: 74599
2009-07-01 07:03:41 +00:00
Daniel Dunbar
7f47cc9423
Rename MCValue::isConstant to isAbsolute.
...
llvm-svn: 74596
2009-07-01 06:48:00 +00:00
Chris Lattner
f5d52813b2
add comments, privatize interface
...
llvm-svn: 74592
2009-07-01 06:31:49 +00:00
Chris Lattner
f2d3b63535
disable some ctors.
...
llvm-svn: 74591
2009-07-01 06:23:14 +00:00
Chris Lattner
9ebcec2f6a
add some comments to MCSymbol header, make the ctor private so that only MCContext can create these.
...
llvm-svn: 74590
2009-07-01 06:21:53 +00:00
Chris Lattner
ad11830fe5
improve comments.
...
llvm-svn: 74589
2009-07-01 06:08:37 +00:00
Chris Lattner
4bdaace06e
improve the APIs for creating struct and function types with no arguments/elements
...
to not have to create a temporary vector (in the API at least). Patch by Jay Foad!
llvm-svn: 74584
2009-07-01 04:13:31 +00:00
Evan Cheng
37503e9671
Handle IMPLICIT_DEF with isUndef operand marker, part 2. This patch moves the code to annotate machineoperands to LiveIntervalAnalysis. It also add markers for implicit_def that define physical registers. The rest, is just a lot of details.
...
llvm-svn: 74580
2009-07-01 01:59:31 +00:00
Daniel Dunbar
bc3d149e98
Remove unused AsmPrinter OptLevel argument, and propogate.
...
- This more or less amounts to a revert of r65379. I'm curious to know what
happened that caused this variable to become unused.
llvm-svn: 74579
2009-07-01 01:48:54 +00:00
Owen Anderson
7e570cd684
Add a global context, for easing backwards compatibility.
...
llvm-svn: 74574
2009-06-30 23:39:59 +00:00
Daniel Dunbar
cf67d9ed78
Fill in some methods for the MCValue field of an MCOperand.
...
llvm-svn: 74572
2009-06-30 23:37:44 +00:00
Daniel Dunbar
d0589c59b3
llvm-mc: Symbols in a relocatable expression of the (a - b + cst) form are
...
allowed to be undefined when the expression is seen, we cannot enforce the
same-section requirement until the entire assembly file has been seen.
llvm-svn: 74565
2009-06-30 22:49:27 +00:00
Bill Wendling
c0fb316bd3
Add an "alignment" field to the MachineFunction object. It makes more sense to
...
have the alignment be calculated up front, and have the back-ends obey whatever
alignment is decided upon.
This allows for future work that would allow for precise no-op placement and the
like.
llvm-svn: 74564
2009-06-30 22:38:32 +00:00
Andreas Bolka
80491961f9
Drop redundant print impl.
...
llvm-svn: 74553
2009-06-30 21:33:56 +00:00
Dan Gohman
148d3bb9b4
Reapply 74494, this time removing the conflicting definition of operator<<
...
in APIntTest.cpp.
llvm-svn: 74550
2009-06-30 20:10:56 +00:00
Owen Anderson
0b1cd834ef
Add wrappers for type construction to LLVMContext.
...
llvm-svn: 74542
2009-06-30 17:50:28 +00:00
Owen Anderson
e9e4a2bdb9
Fix up header comments to make Chris happy.
...
llvm-svn: 74537
2009-06-30 17:06:46 +00:00
Evan Cheng
28b9e77f19
Temporarily restore the scavenger implicit_def checking code. MachineOperand isUndef mark is not being put on implicit_def of physical registers (created for parameter passing, etc.).
...
llvm-svn: 74519
2009-06-30 09:19:42 +00:00
Evan Cheng
c6c942b70f
Add a bit IsUndef to MachineOperand. This indicates the def / use register operand is defined by an implicit_def. That means it can def / use any register and passes (e.g. register scavenger) can feel free to ignore them.
...
The register allocator, when it allocates a register to a virtual register defined by an implicit_def, can allocate any physical register without worrying about overlapping live ranges. It should mark all of operands of the said virtual register so later passes will do the right thing.
This is not the best solution. But it should be a lot less fragile to having the scavenger try to track what is defined by implicit_def.
llvm-svn: 74518
2009-06-30 08:49:04 +00:00
Bill Wendling
1121a4ce5e
Temporarily revert r74494. It was causing failures in the unit tests.
...
llvm-svn: 74515
2009-06-30 07:05:27 +00:00
Owen Anderson
4b4ba9f06c
Fix the build on Cygwin. Patch by Aaron Gray.
...
llvm-svn: 74510
2009-06-30 05:33:46 +00:00
Daniel Dunbar
c3cac19cfe
llvm-mc: Evaluation for relocatable expressions.
...
llvm-svn: 74496
2009-06-30 01:49:52 +00:00
Dan Gohman
2f346db453
Delete a spurious blank line at the top of the file.
...
llvm-svn: 74495
2009-06-30 01:29:09 +00:00
Dan Gohman
f207911974
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.
llvm-svn: 74494
2009-06-30 01:28:08 +00:00
Daniel Dunbar
5bec168037
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): ...
llvm-svn: 74489
2009-06-30 00:49:23 +00:00
Owen Anderson
131b5cfb0c
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.
llvm-svn: 74488
2009-06-30 00:48:55 +00:00
Mikhail Glushenkov
6e8fe4b75c
Move the driver entry point out of Main.inc.
...
llvm-svn: 74482
2009-06-30 00:15:24 +00:00
Daniel Dunbar
72c0434597
llvm-mc: Parse .{,b,p2}align{,w,l} directives.
...
llvm-svn: 74478
2009-06-29 23:46:59 +00:00
Daniel Dunbar
37b8fe7db3
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).
llvm-svn: 74476
2009-06-29 23:43:14 +00:00
Daniel Dunbar
98475719a3
Add SMLoc::isValid method.
...
- To support using SMLoc as a sentinel.
llvm-svn: 74474
2009-06-29 23:28:55 +00:00
Daniel Dunbar
134907cafc
Rename MCValue::getCst to getConstant and add MCValue::isConstant.
...
llvm-svn: 74440
2009-06-29 19:51:00 +00:00
Sebastian Redl
51473d2434
Fix three MSVC 2008 warnings that completely clutter the build output.
...
llvm-svn: 74430
2009-06-29 17:12:06 +00:00
David Greene
21d2c76116
Add more vector ValueTypes for AVX and other extended vector instruction
...
sets.
llvm-svn: 74427
2009-06-29 16:47:10 +00:00
Duncan Sands
efb6d3b78e
Add triple for OpenBSD.
...
llvm-svn: 74422
2009-06-29 13:36:13 +00:00
Mikhail Glushenkov
c513ce52e6
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.
llvm-svn: 74417
2009-06-29 03:09:15 +00:00
Andreas Bolka
1bb3ea724e
Minimal LDA interface, maximally conservative tester.
...
llvm-svn: 74401
2009-06-28 00:21:21 +00:00
Andreas Bolka
f31c966606
LDA analysis output scaffolding.
...
llvm-svn: 74400
2009-06-28 00:16:08 +00:00
Dan Gohman
8d2a45fadb
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.
llvm-svn: 74396
2009-06-27 21:30:38 +00:00
Dan Gohman
e25e17d91e
Eliminate a layer of indirection in LoopInfo and MachineLoopInfo.
...
llvm-svn: 74394
2009-06-27 21:22:48 +00:00
Dan Gohman
592d4b6ee0
Convert ScalarEvolution to use BumpPtrAllocator and FoldingSet, instead
...
of a team of individual allocations and a team of std::maps.
llvm-svn: 74393
2009-06-27 21:21:31 +00:00
Dan Gohman
e1ac906a36
Remove a redundant #include.
...
llvm-svn: 74392
2009-06-27 21:18:51 +00:00
Dan Gohman
36f9ee7670
Change SCEVExpander to use an IRBuilder to emit instructions.
...
llvm-svn: 74391
2009-06-27 21:18:18 +00:00
Dan Gohman
33d2e7a491
Add a 'const' in a comment.
...
llvm-svn: 74389
2009-06-27 20:53:16 +00:00