Commit Graph

98390 Commits

Author SHA1 Message Date
Chris Lattner 9cb1035f94 move isBytewiseValue out to ValueTracking.h/cpp
llvm-svn: 122565
2010-12-26 20:15:01 +00:00
David Chisnall 6f0a7d224b Fix for PR8695.
llvm-svn: 122564
2010-12-26 20:12:30 +00:00
Chris Lattner 81ae3f299a actually add the file...
llvm-svn: 122563
2010-12-26 19:39:38 +00:00
Chris Lattner 2ef535a4e4 Start of a pass for recognizing memset and memcpy idioms.
No functionality yet.

llvm-svn: 122562
2010-12-26 19:32:44 +00:00
Benjamin Kramer 30342fb1fd Simplify code.
llvm-svn: 122561
2010-12-26 15:23:45 +00:00
Chris Lattner f9e0a56b94 fix some sort of weird pasto
llvm-svn: 122560
2010-12-26 12:05:11 +00:00
Chris Lattner 424de3498b add a note
llvm-svn: 122559
2010-12-26 03:53:31 +00:00
Chris Lattner ad3467ee89 The -fshort-wchar option causes wchar_t to become unsigned, in addition to being
16-bits in size.  Implement this by splitting WChar into two enums, like we have
for char.  This fixes a miscompmilation of XULRunner, PR8856.

llvm-svn: 122558
2010-12-25 23:25:43 +00:00
Chris Lattner 03a102bff3 Generalize a previous change, fixing PR8855 - an valid large immediate
rejected by the mc assembler.

llvm-svn: 122557
2010-12-25 21:36:35 +00:00
Chris Lattner d729d0dcdb don't lose TD info
llvm-svn: 122556
2010-12-25 20:52:04 +00:00
Chris Lattner 20fca48341 switch the inliner alignment enforcement stuff to use the
getOrEnforceKnownAlignment function, which simplifies the code
and makes it stronger.

llvm-svn: 122555
2010-12-25 20:42:38 +00:00
Chris Lattner 6fcd32e7d7 Move getOrEnforceKnownAlignment out of instcombine into Transforms/Utils.
llvm-svn: 122554
2010-12-25 20:37:57 +00:00
Michael J. Spencer e13f1ead9b Support/PathV1: Deprecate makeAbsolute and remove Unix impl because it annoys people.
llvm-svn: 122553
2010-12-25 20:10:11 +00:00
Michael J. Spencer bc7fcc2191 Remove all uses of PathV1::GetRootDirectory.
llvm-svn: 122552
2010-12-25 20:09:27 +00:00
Eric Christopher 481de07b00 Header warning patrol.
llvm-svn: 122551
2010-12-25 02:38:01 +00:00
Benjamin Kramer b90b2f0635 Fix a thinko pointed out by Frits van Bommel: looking through global variables in isBytewiseValue is not safe.
llvm-svn: 122550
2010-12-24 22:23:59 +00:00
Rafael Espindola 0f8abeba1d Merge IsFixupFullyResolved and IsSymbolRefDifferenceFullyResolved. We now
have a single point where targets test if a relocation is needed.

llvm-svn: 122549
2010-12-24 21:22:02 +00:00
Benjamin Kramer ea9152e551 MemCpyOpt: Turn memcpys from a constant into a memset if possible.
This allows us to compile "int cst[] = {-1, -1, -1};" into
  movl  $-1, 16(%rsp)
  movq  $-1, 8(%rsp)
instead of
  movl  _cst+8(%rip), %eax
  movl  %eax, 16(%rsp)
  movq  _cst(%rip), %rax
  movq  %rax, 8(%rsp)

llvm-svn: 122548
2010-12-24 21:17:12 +00:00
Daniel Dunbar 7f2bb4dcae MC/Mach-O/ARM: Start handling some Thumb branches.
llvm-svn: 122547
2010-12-24 16:41:46 +00:00
Ted Kremenek 5614c46fcf Add basic support for pointer arithmetic in
SimpleSValBuilder.  This clears up some
false positives emitted by ArrayBoundCheckerV2
due to the lack of support for pointer arithmetic.

llvm-svn: 122546
2010-12-24 08:39:33 +00:00
Andrew Trick 5ce945ca3a Minor cleanup related to my latest scheduler changes.
llvm-svn: 122545
2010-12-24 07:10:19 +00:00
Andrew Trick c94056692a Fix a few cases where the scheduler is not checking for phys reg copies. The scheduling node may have a NULL DAG node, yuck.
llvm-svn: 122544
2010-12-24 06:46:50 +00:00
Argyrios Kyrtzidis 9d6af5328e Remove the EntoSA directories.
llvm-svn: 122543
2010-12-24 06:19:58 +00:00
Jim Grosbach 50986b5d39 Trailing whitespace.
llvm-svn: 122542
2010-12-24 05:06:32 +00:00
Andrew Trick 10ffc2b6c2 Various bits of framework needed for precise machine-level selection
DAG scheduling during isel. Most new functionality is currently
guarded by -enable-sched-cycles and -enable-sched-hazard.

Added InstrItineraryData::IssueWidth field, currently derived from
ARM itineraries, but could be initialized differently on other targets.

Added ScheduleHazardRecognizer::MaxLookAhead to indicate whether it is
active, and if so how many cycles of state it holds.

Added SchedulingPriorityQueue::HasReadyFilter to allowing gating entry
into the scheduler's available queue.

ScoreboardHazardRecognizer now accesses the ScheduleDAG in order to
get information about it's SUnits, provides RecedeCycle for bottom-up
scheduling, correctly computes scoreboard depth, tracks IssueCount, and
considers potential stall cycles when checking for hazards.

ScheduleDAGRRList now models machine cycles and hazards (under
flags). It tracks MinAvailableCycle, drives the hazard recognizer and
priority queue's ready filter, manages a new PendingQueue, properly
accounts for stall cycles, etc.

llvm-svn: 122541
2010-12-24 05:03:26 +00:00
Chris Lattner 9c47b4ac28 don't use #pragma mark, it isn't portable.
llvm-svn: 122540
2010-12-24 04:45:23 +00:00
Andrew Trick c416ba612b whitespace
llvm-svn: 122539
2010-12-24 04:28:06 +00:00
Michael J. Spencer 38e92f6734 ifndef _MSC_VER out #pragma mark on MSVC. It still tries to parse the text even
though it doesn't know what it is, and complains about invalid tokens ;/.

llvm-svn: 122538
2010-12-24 04:07:39 +00:00
Cameron Zwarich ab434079d3 Simplify a check for implicit defs and remove a FIXME.
llvm-svn: 122537
2010-12-24 03:09:36 +00:00
Argyrios Kyrtzidis 338f9aaab2 Handle locations coming from macro instantiations properly in SourceManager::isBeforeInTranslationUnit().
Fixes rdar://8790245 and http://llvm.org/PR8821.

llvm-svn: 122536
2010-12-24 02:53:53 +00:00
John McCall 53fa71476d Refactor how we collect attributes during parsing, and add slots for attributes
on array and function declarators.  This is pretty far from complete, and I'll
revisit it later if someone doesn't beat me to it.

llvm-svn: 122535
2010-12-24 02:08:15 +00:00
Douglas Gregor b4d271ef46 Fix a thinko in a helper routine for template argument deduction that
caused an assertion when dealing with non-type template parameter
packs. Add some tests for deduction and instantiation of non-type
template parameter packs.

llvm-svn: 122534
2010-12-24 00:35:52 +00:00
Douglas Gregor 0da4a99ad3 Non-type template parameter packs cannot have default arguments.
llvm-svn: 122533
2010-12-24 00:20:52 +00:00
Douglas Gregor eb5a39deb2 When instantiating a non-type template parameter pack, be sure to
extract the appropriate argument from the argument pack (based on the
current substitution index, of course). Simple instantiation of pack
expansions involving non-type template parameter packs now works.

llvm-svn: 122532
2010-12-24 00:15:10 +00:00
Kevin Enderby fa3c6f148c In llvm-mc parse a Hash token as a full line comment. Allows handling of
preprocessed .s files and matches darwin gas.  rdar://8798690
Also fix a comment on the next line of AsmParser.cpp after this new code.

llvm-svn: 122531
2010-12-24 00:12:02 +00:00
Jim Grosbach ffaea0f017 Use a StringSwitch<> instead of a manually constructed string matcher.
llvm-svn: 122530
2010-12-24 00:03:39 +00:00
Owen Anderson 226ac14afb When determining if we can fold (x >> C1) << C2, the bits that we need to verify are zero
are not the low bits of x, but the bits that WILL be the low bits after the operation completes.

llvm-svn: 122529
2010-12-23 23:56:24 +00:00
Evan Cheng 62de0fa671 Code clean up. No functionality change.
llvm-svn: 122528
2010-12-23 23:54:17 +00:00
Douglas Gregor da3cc0d3bf Add an AST representation for non-type template parameter
packs, e.g.,

  template<typename T, unsigned ...Dims> struct multi_array;

along with semantic analysis support for finding unexpanded non-type
template parameter packs in types, expressions, and so on.

Template instantiation involving non-type template parameter packs
probably doesn't work yet. That'll come soon.

llvm-svn: 122527
2010-12-23 23:51:58 +00:00
Johnny Chen d71ffbcb24 Uncomment the two failed 'expression' commands regarding fully qualified namespace variables.
And decorate the test cases as @expectedFailure.

llvm-svn: 122525
2010-12-23 23:26:05 +00:00
Jim Grosbach 545858d209 Remove dead patterns.
llvm-svn: 122524
2010-12-23 23:20:13 +00:00
Jim Grosbach bcfa4a945a Recognize a few more documented register name aliases for ARM in the asm lexer.
llvm-svn: 122523
2010-12-23 23:19:54 +00:00
Douglas Gregor 0d0a965b62 Improve the diagnostic and recovery for missing colons after 'case'
and 'default' statements, including a Fix-It to add the colon:

test/Parser/switch-recovery.cpp:13:12: error: expected ':' after 'case'
    case 17 // expected-error{{expected ':' after 'case'}}
           ^
           :
test/Parser/switch-recovery.cpp:16:12: error: expected ':' after 'default'
    default // expected-error{{expected ':' after 'default'}}
           ^
           :

llvm-svn: 122522
2010-12-23 22:56:40 +00:00
Bob Wilson 36be00ceb3 Radar 8803471: Fix expansion of ARM BCCi64 pseudo instructions.
If the basic block containing the BCCi64 (or BCCZi64) instruction ends with
an unconditional branch, that branch needs to be deleted before appending
the expansion of the BCCi64 to the end of the block.

llvm-svn: 122521
2010-12-23 22:45:49 +00:00
Douglas Gregor 27b4c16fef Implement parsing of function parameter packs and non-type template
parameter packs (C++0x [dcl.fct]p13), including disambiguation between
unnamed function parameter packs and varargs (C++0x [dcl.fct]p14) for
cases like 

  void f(T...)

where T may or may not contain unexpanded parameter packs.

llvm-svn: 122520
2010-12-23 22:44:42 +00:00
Ted Kremenek 1d56c9eed7 Add -fobjc-default-synthesized-properties flag
to allow us to explicitly control whether or
not Objective-C properties are default synthesized.
Currently this feature only works when using
the -fobjc-non-fragile-abi2 flag (so there is
no functionality change), but we can now turn
off this feature without turning off all the features
coupled with -fobjc-non-fragile-abi2.

llvm-svn: 122519
2010-12-23 21:35:43 +00:00
Oscar Fuentes 4c6340188a Do not re-test for the existence of pthread.h.
It was causing problems on the MinGW build. See PR8849.

llvm-svn: 122518
2010-12-23 21:27:22 +00:00
Torok Edwin 78561c96b3 XFAIL vg_leak the new test as the rest.
llvm-svn: 122517
2010-12-23 21:22:09 +00:00
Owen Anderson 5d690d4168 It is possible for SimplifyCFG to cause PHI nodes to become redundant too late in the optimization
pipeline to be caught by instcombine, and it's not feasible to catch them in SimplifyCFG because the
use-lists are in an inconsistent state at the point where it could know that it need to simplify them.
Instead, have CodeGenPrepare look for trivially redundant PHIs as part of its general cleanup effort.

llvm-svn: 122516
2010-12-23 20:57:35 +00:00
Johnny Chen 31c39dac6d Add a simple command: 'version' to the command interpreter, and an accompanying
test case test_help_version().

llvm-svn: 122515
2010-12-23 20:21:44 +00:00