Sanjiv Gupta
8ff5a6c262
Executables will be at InstallDir/bin directory. Std header files will be at InstallDir/include, libs will be at InstallDir/lib. Define hooks for these and use them in the options for various tools.
...
llvm-svn: 74611
2009-07-01 16:10:29 +00:00
Stuart Hastings
67a2b76774
Insure that __block_holder_tmp is allocated on the stack when a byref
...
variable is present.
llvm-svn: 74610
2009-07-01 15:40:10 +00:00
Daniel Dunbar
b8f779db87
Fix FindExecutable to work if given an absolute executable path name.
...
- Patch by Viktor Kutuzov, with tweaks by me.
llvm-svn: 74608
2009-07-01 15:26:13 +00:00
Daniel Dunbar
b442e04259
llvm-mc: Add some more doxyments.
...
llvm-svn: 74607
2009-07-01 15:14:50 +00:00
Daniel Dunbar
8d856c89b7
NewNightlyTest: Include minutes/seconds in log file names, to support running
...
multiple runs per day (insane, I know).
Also, remove some unused variables.
llvm-svn: 74605
2009-07-01 14:52:59 +00:00
Misha Brukman
89141b5a79
Added step-by-step directions on how to use the script to build and install an
...
x86_64/Linux -> ARM/Linux crosstool.
llvm-svn: 74603
2009-07-01 13:51:59 +00:00
Evan Cheng
04f72fc955
CommuteChangesDestination() should check if to-be-commuted instruction defines any register. Also teaches the default commuteInstruction() to commute instruction without definitions (e.g. X86::test / ARM::tsp).
...
llvm-svn: 74602
2009-07-01 08:29:08 +00:00
Evan Cheng
2a5efe14a7
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
1cc14c3f3d
Tweak MCSymbol doxyments.
...
llvm-svn: 74599
2009-07-01 07:03:41 +00:00
Daniel Dunbar
9c4809a887
llvm-mc: Fill in the rest of tokens for 'as-lex' mode.
...
llvm-svn: 74598
2009-07-01 06:56:54 +00:00
Owen Anderson
cb86e113a9
Fix the build on OpenBSD.
...
llvm-svn: 74597
2009-07-01 06:53:29 +00:00
Daniel Dunbar
0d5fc9a5b0
Rename MCValue::isConstant to isAbsolute.
...
llvm-svn: 74596
2009-07-01 06:48:00 +00:00
Chris Lattner
e4dfc89615
add some of the new tokens, others are still missing.
...
llvm-svn: 74595
2009-07-01 06:36:49 +00:00
Daniel Dunbar
fc35841077
llvm-mc: Emit parsed instructions to the MCStreamer.
...
llvm-svn: 74594
2009-07-01 06:35:48 +00:00
Daniel Dunbar
23a72aa476
Dump MCInsts in the MC .s printer, for now.
...
llvm-svn: 74593
2009-07-01 06:35:03 +00:00
Chris Lattner
c5327c81d8
add comments, privatize interface
...
llvm-svn: 74592
2009-07-01 06:31:49 +00:00
Chris Lattner
0420d7cb22
disable some ctors.
...
llvm-svn: 74591
2009-07-01 06:23:14 +00:00
Chris Lattner
1d70bbcf5c
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
fceae7d194
improve comments.
...
llvm-svn: 74589
2009-07-01 06:08:37 +00:00
Chris Lattner
96122debc1
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
Chris Lattner
f95fa1b721
Fix some fast-isel problems selecting global variable addressing in
...
pic mode.
llvm-svn: 74582
2009-07-01 03:27:19 +00:00
Evan Cheng
d379e896ff
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
75c12e1569
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
David Goodwin
86c7e20ca6
Add PIC load and store patterns for Thumb-2.
...
llvm-svn: 74577
2009-07-01 00:01:13 +00:00
Owen Anderson
1938fb1954
Add a global context, for easing backwards compatibility.
...
llvm-svn: 74574
2009-06-30 23:39:59 +00:00
Daniel Dunbar
d0a08e0430
llvm-mc: Introduce method to match a parsed x86 instruction into an MCInst.
...
llvm-svn: 74573
2009-06-30 23:38:38 +00:00
Daniel Dunbar
d6ea0300e4
Fill in some methods for the MCValue field of an MCOperand.
...
llvm-svn: 74572
2009-06-30 23:37:44 +00:00
Daniel Dunbar
cfcdf5c1ac
llvm-mc: Accept relocatable expressions when parsing displacements and
...
immediates.
llvm-svn: 74568
2009-06-30 23:02:44 +00:00
David Goodwin
a83100f687
Thumb-2 load and store double description. But nothing yet creates them.
...
llvm-svn: 74566
2009-06-30 22:50:01 +00:00
Daniel Dunbar
8561b6aea0
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
31ceb1bcba
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
David Goodwin
d0890a2bad
Add thumb-2 store word, halfword, and byte.
...
llvm-svn: 74555
2009-06-30 22:11:34 +00:00
Andreas Bolka
e415f52997
Drop redundant print impl.
...
llvm-svn: 74553
2009-06-30 21:33:56 +00:00
Dan Gohman
3423e72b55
Minor code cleanups.
...
llvm-svn: 74551
2009-06-30 20:13:32 +00:00
Dan Gohman
10f1733d9a
Reapply 74494, this time removing the conflicting definition of operator<<
...
in APIntTest.cpp.
llvm-svn: 74550
2009-06-30 20:10:56 +00:00
David Goodwin
28d6d87244
Improve Thumb-2 jump table support.
...
llvm-svn: 74549
2009-06-30 19:50:22 +00:00
David Greene
50475de6af
Add 256-bit memory operand support.
...
llvm-svn: 74548
2009-06-30 19:24:59 +00:00
David Goodwin
27303cde82
Add conditional and unconditional thumb-2 branch. Add thumb-2 jump table.
...
llvm-svn: 74543
2009-06-30 18:04:13 +00:00
Owen Anderson
a8560219c7
Add wrappers for type construction to LLVMContext.
...
llvm-svn: 74542
2009-06-30 17:50:28 +00:00
Chris Lattner
c4501d5242
add a FAQ.
...
llvm-svn: 74538
2009-06-30 17:10:19 +00:00
Owen Anderson
36f62e5df6
Fix up header comments to make Chris happy.
...
llvm-svn: 74537
2009-06-30 17:06:46 +00:00
Rafael Espindola
317fd045e2
Fix PR4485.
...
Avoid unnecessary duplication of operand 0 of X86::FpSET_ST0_80. This duplication would
cause one register to remain on the stack at the function return.
llvm-svn: 74534
2009-06-30 16:40:03 +00:00
Daniel Dunbar
ec6fdb6750
Revert my intentional breakage.
...
llvm-svn: 74531
2009-06-30 16:26:57 +00:00
Daniel Dunbar
c9de159696
Intentionally break a unittest to test my buildbot gtest command.
...
- Apologies in advance for the noise.
llvm-svn: 74530
2009-06-30 16:11:58 +00:00
Daniel Dunbar
3971273aa2
Suppress may-be-used-uninitialized warning.
...
llvm-svn: 74529
2009-06-30 16:02:47 +00:00
Douglas Gregor
16f652876f
Fix CMake build
...
llvm-svn: 74527
2009-06-30 14:37:26 +00:00
Oscar Fuentes
136f9a6512
Fixed assert that checks return value of TlsSetValue.
...
See http://msdn.microsoft.com/en-us/library/ms686818(VS.85).aspx
Patch by Olaf Krzikalla!
llvm-svn: 74526
2009-06-30 14:12:28 +00:00
Rafael Espindola
bd971ffcc6
Fix PR4484.
...
This was caused by me confounding FP0 and ST(0).
llvm-svn: 74523
2009-06-30 12:18:16 +00:00
Evan Cheng
dcf1f59305
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
0dc101b897
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
778a517725
Temporarily revert r74494. It was causing failures in the unit tests.
...
llvm-svn: 74515
2009-06-30 07:05:27 +00:00
Chris Lattner
67f2a4ac4e
got confused again
...
llvm-svn: 74514
2009-06-30 06:27:54 +00:00
Chris Lattner
6ad089cc54
fix some issues Jeff Yasskin noticed
...
llvm-svn: 74512
2009-06-30 06:20:03 +00:00
Chris Lattner
56c1094999
add a note about re-evaluating end() every time through a loop.
...
llvm-svn: 74511
2009-06-30 06:13:23 +00:00
Owen Anderson
00d07afe98
Fix the build on Cygwin. Patch by Aaron Gray.
...
llvm-svn: 74510
2009-06-30 05:33:46 +00:00
Chris Lattner
b127c0684f
remove a bogus note.
...
llvm-svn: 74509
2009-06-30 05:22:31 +00:00
Chris Lattner
5ed255e642
add a note
...
llvm-svn: 74508
2009-06-30 04:20:46 +00:00
Bill Wendling
855263371a
#include <iostream> is forbidden. Remove it in favor of raw_ostream.
...
llvm-svn: 74507
2009-06-30 04:07:12 +00:00
Evan Cheng
57726817aa
A few more load instructions.
...
llvm-svn: 74500
2009-06-30 02:15:48 +00:00
Andreas Bolka
9541801105
Array accesses are independent if the underlying arrays differ.
...
llvm-svn: 74499
2009-06-30 02:12:10 +00:00
Daniel Dunbar
75630b355a
llvm-mc: Accept relocatable expressions for .org, assignments, .byte, etc.
...
llvm-svn: 74498
2009-06-30 02:10:03 +00:00
Daniel Dunbar
19f847fa68
llvm-mc: Rewrite binary subtraction for relocatable expressions, we can't always
...
legally negate an MCValue.
llvm-svn: 74497
2009-06-30 02:08:27 +00:00
Daniel Dunbar
bd4bf3d4f7
llvm-mc: Evaluation for relocatable expressions.
...
llvm-svn: 74496
2009-06-30 01:49:52 +00:00
Dan Gohman
7013ca5434
Delete a spurious blank line at the top of the file.
...
llvm-svn: 74495
2009-06-30 01:29:09 +00:00
Dan Gohman
e95d409bdd
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
Dan Gohman
e8eca73cdd
Minor formatting, whitespace, and 80-column fixes.
...
llvm-svn: 74492
2009-06-30 01:25:30 +00:00
Dan Gohman
4dfc680059
Minor code simplification.
...
llvm-svn: 74491
2009-06-30 01:24:43 +00:00
David Goodwin
17512663f5
Enhance tests to include shifted-register operand testing.
...
llvm-svn: 74490
2009-06-30 01:02:20 +00:00
Daniel Dunbar
c9dc78ae40
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
8e66e0bab4
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
Daniel Dunbar
a5508c893a
llvm-mc: Parse symbol attribute directives.
...
llvm-svn: 74487
2009-06-30 00:33:19 +00:00
Mikhail Glushenkov
7b366b5d47
Regenerate.
...
llvm-svn: 74485
2009-06-30 00:16:43 +00:00
Mikhail Glushenkov
8a4d713e48
Clang is now production quality (at least for C).
...
llvm-svn: 74484
2009-06-30 00:16:22 +00:00
Mikhail Glushenkov
3fcdada6b4
Add a way to access argv[0] in hooks.
...
llvm-svn: 74483
2009-06-30 00:16:00 +00:00
Mikhail Glushenkov
f40b590721
Move the driver entry point out of Main.inc.
...
llvm-svn: 74482
2009-06-30 00:15:24 +00:00
Daniel Dunbar
cc566a714b
llvm-mc: Parse .{,b,p2}align{,w,l} directives.
...
llvm-svn: 74478
2009-06-29 23:46:59 +00:00
Devang Patel
0a9f9759a3
Struct types are described using field types only.
...
llvm-svn: 74477
2009-06-29 23:46:50 +00:00
Daniel Dunbar
ae7ac01059
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
abe6f35c31
Add SMLoc::isValid method.
...
- To support using SMLoc as a sentinel.
llvm-svn: 74474
2009-06-29 23:28:55 +00:00
Daniel Dunbar
f71a0cca84
Fix install of libCompilerDriver dynamic library to not copy on every build.
...
llvm-svn: 74473
2009-06-29 22:59:36 +00:00
David Greene
371ca49bad
Remove commented code.
...
llvm-svn: 74471
2009-06-29 22:55:52 +00:00
David Greene
8adf1fdc80
Add a 256-bit register class and YMM registers.
...
llvm-svn: 74469
2009-06-29 22:50:51 +00:00
David Goodwin
76b37950ca
Add Thumb-2 support for TEQ amd TST.
...
llvm-svn: 74468
2009-06-29 22:49:42 +00:00
David Goodwin
911edef65b
Thumb-2 tests
...
llvm-svn: 74464
2009-06-29 22:25:22 +00:00
Daniel Dunbar
5992b4a211
llvm-mc: Recognize C++ style comments.
...
llvm-svn: 74463
2009-06-29 22:00:57 +00:00
Daniel Dunbar
6b22f9ca45
llvm-mc: Recognize C++ style comments.
...
llvm-svn: 74462
2009-06-29 21:58:22 +00:00
Dan Gohman
9d203c636b
Use getSCEV instead of getUnknown to create a SCEV for a
...
Constant. This lets ConstantInts be handled as SCEVConstant instead
of SCEVUnknown, as getUnknown no longer has special-case code for
ConstantInt and friends. This usually doesn't affect the final
output, since the constants end up getting folded later, but it
does make intermediate expressions more obvious in many cases.
llvm-svn: 74459
2009-06-29 21:31:18 +00:00
Daniel Dunbar
231898baf5
Fix uninitialized variable warning.
...
llvm-svn: 74457
2009-06-29 21:14:21 +00:00
Daniel Dunbar
fdbbc52cfd
Don't build LLVMC when configured with --disable-pic (it needs requires shared
...
module support to build).
llvm-svn: 74456
2009-06-29 21:12:26 +00:00
Torok Edwin
896556eec7
Set wasRun to false here on Dan's suggestion.
...
llvm-svn: 74455
2009-06-29 21:05:10 +00:00
Devang Patel
40d784180b
s/MainCU/ModuleCU/g
...
llvm-svn: 74452
2009-06-29 20:45:18 +00:00
Daniel Dunbar
84bfd7b184
MC: Improve expression parsing and implement evaluation of absolute expressions
...
(missed files).
llvm-svn: 74450
2009-06-29 20:40:36 +00:00
Devang Patel
8635345d8a
Multiple DW_TAG_compile_unit is not used, afaict, on any target.
...
Update dwarf writer to only emit one DW_TAG_compile_unit per .o file.
llvm-svn: 74449
2009-06-29 20:38:13 +00:00
Daniel Dunbar
7e8d6c7215
MC: Improve expression parsing and implement evaluation of absolute expressions.
...
llvm-svn: 74448
2009-06-29 20:37:27 +00:00
Dan Gohman
19d2417c90
Don't cache PHI exit values from exhaustive evaluations, because
...
an individual exhaustive evaluation reflects only the exit value
implied by an individual exit, which may differ from the actual
exit value of the loop if there are other exits. This fixes PR4477.
llvm-svn: 74447
2009-06-29 20:34:13 +00:00
Rafael Espindola
538064d6b1
FIX PR 4459.
...
Not sure I understand how the temp register gets used,
but this fixes a bug and introduces no regressions.
llvm-svn: 74446
2009-06-29 20:29:59 +00:00
David Greene
f71ee01c81
Add some tests of advanced TableGen list functionality.
...
llvm-svn: 74445
2009-06-29 20:07:17 +00:00
David Greene
efa19619c8
Implement !cast<string>.
...
llvm-svn: 74444
2009-06-29 20:05:29 +00:00
David Greene
fd42c8a567
Improve TableGen error reporting.
...
llvm-svn: 74443
2009-06-29 19:59:52 +00:00
Torok Edwin
6fb3e98eed
Initialize CurSection in constructor.
...
Not doing so causes some unittests to fail, because CurSection is uninitialized.
llvm-svn: 74442
2009-06-29 19:59:10 +00:00
Daniel Dunbar
7cbba368fb
Fix order of arguments to EXPECT_EQ
...
llvm-svn: 74441
2009-06-29 19:57:24 +00:00
Daniel Dunbar
a97615adf8
Rename MCValue::getCst to getConstant and add MCValue::isConstant.
...
llvm-svn: 74440
2009-06-29 19:51:00 +00:00
Andreas Bolka
6037bc9e60
Relax LDA memory instruction checks.
...
llvm-svn: 74439
2009-06-29 18:51:11 +00:00
Torok Edwin
24c7835d19
Call doInitialization(), releaseMemory(), and doFinalization() for on-the-fly passes as well.
...
Also don't call finalizers for LoopPass if initialization was not called.
Add a unittest that tests that these methods are called, in the proper
order, and the correct number of times.
llvm-svn: 74438
2009-06-29 18:49:09 +00:00
Dan Gohman
e00beaaee8
Simplify this code, and avoid using APInt(). This fixes
...
(otherwise harmless) uninitialized value warnings that
Duncan found with gcc-4.4.
llvm-svn: 74437
2009-06-29 18:25:52 +00:00
Owen Anderson
45c299ef65
Add a target-specific DAG combine on X86 to fold the common pattern of
...
fence-atomic-fence down to just the atomic op. This is possible thanks to
X86's relatively strong memory model, which guarantees that locked instructions
(which are used to implement atomics) are implicit fences.
llvm-svn: 74435
2009-06-29 18:04:45 +00:00
Sebastian Redl
1257581438
Fix three MSVC 2008 warnings that completely clutter the build output.
...
llvm-svn: 74430
2009-06-29 17:12:06 +00:00
David Greene
46b56ffae3
Add processor descriptions for Istanbul and Shanghai.
...
llvm-svn: 74429
2009-06-29 16:54:06 +00:00
David Greene
a4b8998fbb
Fix a subtarget feature bug.
...
llvm-svn: 74428
2009-06-29 16:51:01 +00:00
David Greene
f92ba97cda
Add more vector ValueTypes for AVX and other extended vector instruction
...
sets.
llvm-svn: 74427
2009-06-29 16:47:10 +00:00
Douglas Gregor
e081d90233
Fix CMake checks for pthread_getspecific and pthread_rwlock_init, from Xerxes Ranby
...
llvm-svn: 74426
2009-06-29 16:25:22 +00:00
David Goodwin
dbf11ba800
Rename ARMcmpNZ to ARMcmpZ and use it to represent comparisons that set only the Z flag (i.e. eq and ne). Make ARMcmpZ commutative.
...
llvm-svn: 74423
2009-06-29 15:33:01 +00:00
Duncan Sands
14814d4477
Add triple for OpenBSD.
...
llvm-svn: 74422
2009-06-29 13:36:13 +00:00
Duncan Sands
24a3724b04
Include the new file ThumbRegisterInfo.cpp to CMakeLists.txt
...
to make sure ThumbRegisterInfo.cpp are compiled and linked in.
Patch by Xerxes.
llvm-svn: 74421
2009-06-29 13:11:32 +00:00
Evan Cheng
b23b50d54d
Implement Thumb2 ldr.
...
After much back and forth, I decided to deviate from ARM design and split LDR into 4 instructions (r + imm12, r + imm8, r + r << imm12, constantpool). The advantage of this is 1) it follows the latest ARM technical manual, and 2) makes it easier to reduce the width of the instruction later. The down side is this creates more inconsistency between the two sub-targets. We should split ARM LDR instruction in a similar fashion later. I've added a README entry for this.
llvm-svn: 74420
2009-06-29 07:51:04 +00:00
Mikhail Glushenkov
72f3f7eb56
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
3a09c8bd5e
Missed one.
...
llvm-svn: 74416
2009-06-29 00:53:49 +00:00
Andreas Bolka
c5558a83f4
Fix case in LDA util function names.
...
llvm-svn: 74415
2009-06-29 00:50:26 +00:00
Andreas Bolka
9d09e20142
Print pairwise dependence results, add testcases.
...
llvm-svn: 74402
2009-06-28 00:35:22 +00:00
Andreas Bolka
9fee7f86ad
Minimal LDA interface, maximally conservative tester.
...
llvm-svn: 74401
2009-06-28 00:21:21 +00:00
Andreas Bolka
8976d3bc7e
LDA analysis output scaffolding.
...
llvm-svn: 74400
2009-06-28 00:16:08 +00:00
Dan Gohman
317f054531
Don't try to split a loop when the controlling icmp instruction
...
doesn't have an IV-based operand. This fixes PR4471.
llvm-svn: 74399
2009-06-27 22:58:27 +00:00
Dan Gohman
ffdcba3dbd
Remove the block from the LoopInfo, rather than just the Loop.
...
LoopInfo will handle removing it from the Loop, as well as updating
its own tables.
llvm-svn: 74398
2009-06-27 22:32:36 +00:00
Dan Gohman
c8ca49659a
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
8918b481bf
More minor code simplifications.
...
llvm-svn: 74395
2009-06-27 21:23:40 +00:00
Dan Gohman
4f16a2923c
Eliminate a layer of indirection in LoopInfo and MachineLoopInfo.
...
llvm-svn: 74394
2009-06-27 21:22:48 +00:00
Dan Gohman
c5c85c0fec
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
7ed0bb3b7c
Remove a redundant #include.
...
llvm-svn: 74392
2009-06-27 21:18:51 +00:00
Dan Gohman
830fd38d9b
Change SCEVExpander to use an IRBuilder to emit instructions.
...
llvm-svn: 74391
2009-06-27 21:18:18 +00:00
Dan Gohman
3a4be9df4a
Add a 'const' in a comment.
...
llvm-svn: 74389
2009-06-27 20:53:16 +00:00
Anton Korobeynikov
0f2158b35f
Simplify a bit
...
llvm-svn: 74385
2009-06-27 12:59:03 +00:00
Anton Korobeynikov
a1b5b18bd0
ARM refactoring. Step 2: split RegisterInfo
...
llvm-svn: 74384
2009-06-27 12:16:40 +00:00
Douglas Gregor
33400e3670
Add ThumbInstrInfo.cpp to the CMake makefiles
...
llvm-svn: 74382
2009-06-27 07:44:59 +00:00
Chris Lattner
1ec3afdc66
remove a bunch of fixmes (old checking code) and commonize all the
...
target-specific operand printing functionality. Yay.
llvm-svn: 74379
2009-06-27 05:46:24 +00:00
Chris Lattner
ae0acfcef0
pull @GOT, @GOTOFF, @GOTPCREL handling into isel from the asmprinter.
...
llvm-svn: 74378
2009-06-27 05:39:56 +00:00
Chris Lattner
cce1589e4e
simplify some code and eliminate the symbolicAddressesAreRIPRel() predicate.
...
llvm-svn: 74377
2009-06-27 05:24:12 +00:00
Dan Gohman
fe174b6952
When a value is used multiple times within a single PHI, instructions
...
inserted to replace that value must dominate all of of the basic
blocks associated with the uses of the value in the PHI, not just
one of them.
llvm-svn: 74376
2009-06-27 05:16:57 +00:00
Chris Lattner
d17366ae72
fix clang/test/CodeGenObjC/try.m, a basereg doesn't mean no global anymore.
...
llvm-svn: 74375
2009-06-27 04:50:14 +00:00
Chris Lattner
014e83d40d
fix a bunch of failures in the X86-64 JIT by tolerating RIP as
...
a base register. We just ignore it for now.
llvm-svn: 74374
2009-06-27 04:46:33 +00:00
Chris Lattner
9876bd8257
factor some logic out into a helper function, allow remat of loads from constant
...
globals. This implements remat-constant.ll even without aggressive-remat.
llvm-svn: 74373
2009-06-27 04:38:55 +00:00
Chris Lattner
fea81da433
Reimplement rip-relative addressing in the X86-64 backend. The new
...
implementation primarily differs from the former in that the asmprinter
doesn't make a zillion decisions about whether or not something will be
RIP relative or not. Instead, those decisions are made by isel lowering
and propagated through to the asm printer. To achieve this, we:
1. Represent RIP relative addresses by setting the base of the X86 addr
mode to X86::RIP.
2. When ISel Lowering decides that it is safe to use RIP, it lowers to
X86ISD::WrapperRIP. When it is unsafe to use RIP, it lowers to
X86ISD::Wrapper as before.
3. This removes isRIPRel from X86ISelAddressMode, representing it with
a basereg of RIP instead.
4. The addressing mode matching logic in isel is greatly simplified.
5. The asmprinter is greatly simplified, notably the "NotRIPRel" predicate
passed through various printoperand routines is gone now.
6. The various symbol printing routines in asmprinter now no longer infer
when to emit (%rip), they just print the symbol.
I think this is a big improvement over the previous situation. It does have
two small caveats though: 1. I implemented a horrible "no-rip" modifier for
the inline asm "P" constraint modifier. This is a short term hack, there is
a much better, but more involved, solution. 2. I had to xfail an
-aggressive-remat testcase because it isn't handling the use of RIP in the
constant-pool reading instruction. This specific test is easy to fix without
-aggressive-remat, which I intend to do next.
llvm-svn: 74372
2009-06-27 04:16:01 +00:00
Chris Lattner
df92e147c9
remove some unneeded eh info.
...
llvm-svn: 74371
2009-06-27 04:07:31 +00:00
Chris Lattner
c91e8c7464
When doing remat, don't consider uses of non-allocatable physregs. Patch
...
by Evan.
llvm-svn: 74370
2009-06-27 04:06:41 +00:00
Evan Cheng
eab9ca7ea6
Renaming for consistency.
...
llvm-svn: 74368
2009-06-27 02:26:13 +00:00
Chris Lattner
de36afc1fe
testcase for PR4466
...
llvm-svn: 74367
2009-06-27 01:33:35 +00:00
Chris Lattner
a3260c0b1b
Fix PR4466 by making fastisel set operand flags correctly.
...
llvm-svn: 74366
2009-06-27 01:31:51 +00:00
Chris Lattner
a4775f2b13
fix a typo that GCC should have caught that causes crashes with -view-*-dags
...
llvm-svn: 74364
2009-06-27 00:57:02 +00:00
David Goodwin
5d8b6eef5a
Remove outdated comment.
...
llvm-svn: 74357
2009-06-26 23:39:02 +00:00
David Goodwin
5285817490
When possible, use "mvn ra, rb" instead of "eor ra, rb, -1" because mvn has a narrow version and eor(i) does not.
...
llvm-svn: 74355
2009-06-26 23:13:13 +00:00
Dan Gohman
d3b930d426
Add some testcases for some of the recent ScalarEvolution bug fixes.
...
llvm-svn: 74353
2009-06-26 22:54:11 +00:00