Commit Graph

96009 Commits

Author SHA1 Message Date
Bill Wendling 2063b84297 Add support for parsing the writeback ("!") token.
llvm-svn: 119761
2010-11-18 23:43:05 +00:00
Jason W Kim 5a97bd873e Fix .o emission of ARM movt/movw. MCSymbolRefExpr::VK_ARM_(HI||LO)16 for the .o path now works for ARM.
Note: lo16AllZero remains in ARMInstrInfo.td - It can be factored out when Thumb movt is repaired.
Existing tests cover this update.

llvm-svn: 119760
2010-11-18 23:37:15 +00:00
Bill Wendling 4a08e563d7 Give the exclamation point a name instead of a number.
llvm-svn: 119759
2010-11-18 23:36:54 +00:00
Johnny Chen 835a88cb15 Add Python API tests for file and class static variables, too.
llvm-svn: 119758
2010-11-18 23:33:43 +00:00
Greg Clayton 99d0faf27e Cleaned up code that wasn't using the Initialize and Terminate paradigm by
changing it to use it. There was an extra parameter added to the static
accessor global user settings controllers that wasn't needed. A bool was being
used as a parameter to the accessor just so it could be used to clean up 
the global user settings controller which is now fixed by splitting up the
initialization into the "static void Class::Initialize()", access into the
"static UserSettingsControllerSP & Class::GetSettingsController()", and
cleanup into "static void Class::Terminate()".

Also added initialize and terminate calls to the logging code to avoid issues
when LLDB is shutting down. There were cases after the logging was switched
over to use shared pointers where we could crash if the global destructor
chain was being run and it causes the log to be destroyed and any any logging
occurred.

llvm-svn: 119757
2010-11-18 23:32:35 +00:00
Owen Anderson 690fa953e1 More tests.
llvm-svn: 119756
2010-11-18 23:30:10 +00:00
Owen Anderson 3517585249 Fix encodings for pkhbt, and fix some tests where I accidentally tested ARM mode instead of Thumb2.
llvm-svn: 119755
2010-11-18 23:29:56 +00:00
Anton Korobeynikov 14ee344944 Move getInitialFrameState() to TargetFrameInfo
llvm-svn: 119754
2010-11-18 23:25:52 +00:00
Jim Grosbach a391c97bd0 ARM Encoding information for UXTAH and friends.
llvm-svn: 119753
2010-11-18 23:24:22 +00:00
Fariborz Jahanian 148d113e55 Fix a bug where write-barriers for assignment through reference
types was not being generated for objc pointers.
// rdar://8681766.

llvm-svn: 119751
2010-11-18 22:39:16 +00:00
Sean Callanan 7a55a32108 Fixed the logic in IRForTarget that recognizes
externally-defined variables to match up with
the code in ClangASTSource that produces them.

llvm-svn: 119750
2010-11-18 22:21:58 +00:00
Tanya Lattner cd68095650 Fix bug in DAGCombiner for ARM that was trying to do a ShiftCombine on illegal types (vector should be split first).
Added test case.

llvm-svn: 119749
2010-11-18 22:06:46 +00:00
Bob Wilson 2acd1621f4 Use a signed vector type for the shift amount operand of unsigned shifts.
Neon shifts allow a mix of positive and negative shift amounts to shift
left or right, respectively, so the shift amount vector should always be
signed.  PR8482 (Radar 8603521).

llvm-svn: 119748
2010-11-18 21:51:10 +00:00
Bill Wendling 0ab0f67925 Don't allocate the SmallVector of Registers. It gets messy figuring out who
should delete what when the object gets copied around. It's also making valgrind
upset.

llvm-svn: 119747
2010-11-18 21:50:54 +00:00
Argyrios Kyrtzidis 31448a415e Use hasErrorOccurred() instead of getNumErrors() where it makes sense.
llvm-svn: 119746
2010-11-18 21:47:07 +00:00
Argyrios Kyrtzidis 8d5038c1b3 Get the number of errors reported from the diagnostic client, in clang_parseTranslationUnit_Impl.
llvm-svn: 119745
2010-11-18 21:47:04 +00:00
Owen Anderson 10839cb62c Provide Thumb2 encodings for mov's that come from MOVCC SDNodes.
llvm-svn: 119744
2010-11-18 21:46:31 +00:00
Jim Grosbach 1b91ae18ed Add ARM encoding information for LDRH post-increment.
llvm-svn: 119743
2010-11-18 21:43:37 +00:00
Bob Wilson 4e22a38759 Change the 'x' type modifier for Neon intrinsics to force a signed integer.
This makes it symmetric with the 'u' modifier that forces an unsigned type.
This is needed for unsigned vector shifts, where the shift amount still needs
to be signed.  PR8482 (Radar 8603521).

llvm-svn: 119742
2010-11-18 21:43:22 +00:00
Benjamin Kramer fc305988b8 Update CMake build.
llvm-svn: 119741
2010-11-18 21:19:52 +00:00
Anton Korobeynikov 0eecf5d201 Move hasFP() and few related hooks to TargetFrameInfo.
llvm-svn: 119740
2010-11-18 21:19:35 +00:00
Duncan Sands c92331b984 Fix thinko: we must turn select(anyext, sext) into sext(select)
not anyext(select).  Spotted by Frits van Bommel.

llvm-svn: 119739
2010-11-18 21:16:28 +00:00
Bob Wilson 7d47133ff7 Split up ARM LowerShift function.
This function was being called from two different places for completely
unrelated reasons.  During type legalization, it was called to expand 64-bit
shift operations.  During operation legalization, it was called to handle
Neon vector shifts.  The vector shift code was not written to check for
illegal types, since it was assumed to be only called after type legalization.
Fixed this by splitting off the 64-bit shift expansion into a separate
function.  I don't have a particular testcase for this; I just noticed it
by inspection.

llvm-svn: 119738
2010-11-18 21:16:28 +00:00
Owen Anderson 3fec5ff14b More Thumb2 encodings.
llvm-svn: 119737
2010-11-18 21:15:19 +00:00
Argyrios Kyrtzidis bc4679335c Remove the hack where, to get the return status, we had special case for VerifyDiagnosticsClient
and just check the number of errors from the DiagnosticClient.

llvm-svn: 119736
2010-11-18 21:13:57 +00:00
Argyrios Kyrtzidis 6d35b5a210 Keep track of errors/warnings in FixItRewriter.
llvm-svn: 119735
2010-11-18 21:13:54 +00:00
Johnny Chen 3df7f94fd0 Add a test for displaying file and class static variables.
llvm-svn: 119734
2010-11-18 20:35:54 +00:00
Owen Anderson 3625098459 Fill out the set of Thumb2 multiplication operator encodings.
llvm-svn: 119733
2010-11-18 20:32:18 +00:00
Johnny Chen b4d59f477b Remove whitespace chars.
llvm-svn: 119732
2010-11-18 20:20:18 +00:00
Argyrios Kyrtzidis c79346a57c Since multiple diagnostics can share one diagnostic client, have the client keeping track
of the total number of warnings/errors reported.

llvm-svn: 119731
2010-11-18 20:06:46 +00:00
Argyrios Kyrtzidis d004064864 Refactoring of Diagnostic class.
-Move the stuff of Diagnostic related to creating/querying diagnostic IDs into a new DiagnosticIDs class.
-DiagnosticIDs can be shared among multiple Diagnostics for multiple translation units.
-The rest of the state in Diagnostic object is considered related and tied to one translation unit.
-Have Diagnostic point to the SourceManager that is related with. Diagnostic can now accept just a
   SourceLocation instead of a FullSourceLoc.
-Reflect the changes to various interfaces.

llvm-svn: 119730
2010-11-18 20:06:41 +00:00
Argyrios Kyrtzidis 4fadc5b20a Copy the LangOptions in PrintingPolicy to avoid pointing to a LangOptions that is long gone.
llvm-svn: 119729
2010-11-18 20:06:30 +00:00
Duncan Sands 12f3b3b44f The DAGCombiner was threading select over pairs of extending loads even
if the extension types were not the same.  The result was that if you
fed a select with sext and zext loads, as in the testcase, then it
would get turned into a zext (or sext) of the select, which is wrong
in the cases when it should have been an sext (resp. zext).  Reported
and diagnosed by Sebastien Deldon.

llvm-svn: 119728
2010-11-18 20:05:18 +00:00
Duncan Sands aef146b890 Factor code for testing whether replacing one value with another
preserves LCSSA form out of ScalarEvolution and into the LoopInfo
class.  Use it to check that SimplifyInstruction simplifications
are not breaking LCSSA form.  Fixes PR8622.

llvm-svn: 119727
2010-11-18 19:59:41 +00:00
Bill Wendling b9bd594610 Missed the _RET versions of LDMIA.
llvm-svn: 119726
2010-11-18 19:44:29 +00:00
Eric Christopher b006fc9c07 Rewrite stack callee saved spills and restores to use push/pop instructions.
Remove movePastCSLoadStoreOps and associated code for simple pointer
increments. Update routines that depended upon other opcodes for save/restore.

Adjust all testcases accordingly.

llvm-svn: 119725
2010-11-18 19:40:05 +00:00
John McCall 4bc41aee2b Add an assertion, fix a whole bunch of bugs, comment the assertion
out because there are still bugs left.

llvm-svn: 119722
2010-11-18 19:01:18 +00:00
Owen Anderson 2e831897d6 Fix an order-of-deallocation issue where the AttrListImpl could be deallocated before the global
LLVMContext, causing memory errors.  Patch by Peter Collingbourne.

llvm-svn: 119721
2010-11-18 18:59:13 +00:00
Greg Clayton 4e78f60660 Added the ability to get more information on the SBThread's stop reason
by being able to get the data count and data. Each thread stop reason
has one or more data words that can help describe the stop. To do this
I added:

    size_t
	SBThread::GetStopReasonDataCount();

	uint64_t
	SBThread::GetStopReasonDataAtIndex(uint32_t idx);

llvm-svn: 119720
2010-11-18 18:52:36 +00:00
Argyrios Kyrtzidis 745f9996d0 Remove the getDiagnosticLevel check since it doesn't buy us much.
llvm-svn: 119719
2010-11-18 18:51:03 +00:00
Owen Anderson aa398c1617 Use thread-safe statics to avoid a static constructor here. This isn't thread-safe on MSVC, but we don't
support threaded LLVM there anyways.

llvm-svn: 119718
2010-11-18 18:49:05 +00:00
Dan Gohman e4f7ec17f8 Oops, missed this file when remaing ExpandPseudos to ExpandISelPseudos.
llvm-svn: 119717
2010-11-18 18:48:28 +00:00
Dan Gohman c2b786163c Rename ExpandPseudos to ExpandISelPseudos to help clarify its role.
llvm-svn: 119716
2010-11-18 18:45:06 +00:00
Owen Anderson c21c100f3d Completely rework the datastructure GVN uses to represent the value number to leader mapping. Previously,
this was a tree of hashtables, and a query recursed into the table for the immediate dominator ad infinitum
if the initial lookup failed.  This led to really bad performance on tall, narrow CFGs.

We can instead replace it with what is conceptually a multimap of value numbers to leaders (actually
represented by a hashtable with a list of Value*'s as the value type), and then
determine which leader from that set to use very cheaply thanks to the DFS numberings maintained by
DominatorTree.  Because there are typically few duplicates of a given value, this scan tends to be
quite fast.  Additionally, we use a custom linked list and BumpPtr allocation to avoid any unnecessary
allocation in representing the value-side of the multimap.

This change brings with it a 15% (!) improvement in the total running time of GVN on 403.gcc, which I
think is pretty good considering that includes all the "real work" being done by MemDep as well.

The one downside to this approach is that we can no longer use GVN to perform simple conditional progation,
but that seems like an acceptable loss since we now have LVI and CorrelatedValuePropagation to pick up
the slack.  If you see conditional propagation that's not happening, please file bugs against LVI or CVP.

llvm-svn: 119714
2010-11-18 18:32:40 +00:00
Jim Grosbach 51fdc47a11 ARMPseudoInst instructions should default to being considered a single 4-byte
instruction. Any that may be expanded otherwise by MC lowering should
override this value. rdar://8683274

llvm-svn: 119713
2010-11-18 18:01:40 +00:00
Dan Gohman 5a1a2d53de Fix typos.
llvm-svn: 119712
2010-11-18 17:44:17 +00:00
Dan Gohman 0037f431e5 Document the units for the Size field.
llvm-svn: 119711
2010-11-18 17:39:01 +00:00
Howard Hinnant d518d1c807 LWG 1522
llvm-svn: 119710
2010-11-18 17:34:48 +00:00
Greg Clayton ce02552b6a Added missing file.
llvm-svn: 119709
2010-11-18 17:29:15 +00:00
Dan Gohman 5ed61fe6a1 Bounds-check APInt's operator[].
llvm-svn: 119708
2010-11-18 17:14:56 +00:00