Commit Graph

84335 Commits

Author SHA1 Message Date
Craig Topper 663d160adb Custom lower FMA intrinsics to target specific nodes and remove the patterns.
llvm-svn: 162534
2012-08-24 04:03:22 +00:00
Eric Christopher bb69a27dbc Use DW_FORM_flag_present to save space in debug information if we're
not in darwin gdb compat mode.

Fixes rdar://10975088

llvm-svn: 162526
2012-08-24 01:14:27 +00:00
Eric Christopher d999bb7ff4 Add support for some missing DW_FORM_*.
TODO: Fix code duplication and coding style.
llvm-svn: 162525
2012-08-24 01:14:23 +00:00
Eric Christopher 67942acc6b Formatting.
llvm-svn: 162524
2012-08-24 01:14:21 +00:00
Richard Smith f3c75f7e7c Fix undefined behavior (negation of INT_MIN) in ARM backend.
llvm-svn: 162520
2012-08-24 00:35:46 +00:00
Richard Smith c621af1f60 Fix floating-point divide by zero, in a case where the value was not going to be used anyway.
llvm-svn: 162518
2012-08-24 00:31:45 +00:00
Jakob Stoklund Olesen d3511235d1 Remove some spurious mayLoad = 0 flags.
They were inserted to silence TableGen's warning about
redundant properties. That warning is now gone.

llvm-svn: 162517
2012-08-24 00:31:20 +00:00
Jakob Stoklund Olesen 94ed4d42f8 Heed guessInstructionProperties, and stop warning on redundant flags.
Emit TableGen errors if guessInstructionProperties is 0 and
instruction properties can't be inferred from patterns.

Allow explicit instruction properties even when they can be inferred.

This patch doesn't change the TableGen output. Redundant properties
are not yet verified because the tree has errors.

llvm-svn: 162516
2012-08-24 00:31:16 +00:00
Jakob Stoklund Olesen acf7c47e64 Add missing SDNP properties on the flushw node.
llvm-svn: 162515
2012-08-24 00:31:13 +00:00
Jakob Stoklund Olesen df1faa0503 X86MemBarrier has unmodeled side effects.
llvm-svn: 162514
2012-08-24 00:31:10 +00:00
Richard Smith 156d92037a Fix undefined behavior (signed integer overflow) when Clang parses a hexfloat with an enormous exponent. Caught by an existing unit test + -ftrapv.
llvm-svn: 162505
2012-08-24 00:01:19 +00:00
Eric Christopher 20b897b693 Formatting cleanup.
llvm-svn: 162499
2012-08-23 23:26:57 +00:00
Eric Christopher 9142ea7bec Add an assert here in case parsing gave us a NULL compile unit.
llvm-svn: 162498
2012-08-23 23:21:11 +00:00
Eric Christopher acb7115bde Remove the DW_AT_MIPS_linkage name attribute when we don't need it
output (we're emitting a specification already and the information
isn't changing) and we're not in old gdb compat mode.

Saves 1% on the debug information for a build of llvm.

Fixes rdar://11043421

llvm-svn: 162493
2012-08-23 22:52:55 +00:00
Eric Christopher 20b76a77c3 Turn these two options in to trinary state so that they can be
turned on and off separate from the platform if you're on darwin.

llvm-svn: 162487
2012-08-23 22:36:40 +00:00
Eric Christopher 4977f214d7 Add a flag to DwarfDebug to allow it to communicate whether or not
we're using the darwin old gdb compat mode for emitting dwarf.

llvm-svn: 162486
2012-08-23 22:36:36 +00:00
Jakob Stoklund Olesen 7030427623 Preserve operand flags in convertToThreeAddress() by copying operands.
No test case, this is a generalization of r160260.

llvm-svn: 162485
2012-08-23 22:36:31 +00:00
Jakob Stoklund Olesen af507bf450 Tristate mayLoad, mayStore, and hasSideEffects.
Keep track of the set/unset state of these bits along with their
true/false values, but treat '?' as '0' for now.

llvm-svn: 162461
2012-08-23 19:34:46 +00:00
Jakob Stoklund Olesen 9dc03bba14 Add CodeGenTarget::guessInstructionProperties.
Currently, TableGen just guesses instruction properties when it can't
infer them form patterns.

This adds a guessInstructionProperties flag to the instruction set
definition that will be used to disable guessing. The flag is intended
as a migration aid. It will be removed again when no more targets need
their properties guessed.

llvm-svn: 162460
2012-08-23 19:34:41 +00:00
Jakob Stoklund Olesen 6c0c2f2642 Fix attributes on X86 store intrinsics.
These intrinsics don't have unmodeled side effects, they are just
stores.

llvm-svn: 162459
2012-08-23 19:21:38 +00:00
Lang Hames b86a55a161 Fix a stub signature. HeuristicReduce should return a bool.
This should fix a -Wdocumentation warning.

llvm-svn: 162458
2012-08-23 19:06:23 +00:00
Craig Topper 4a4634d6de Favor FMA3 over FMA4 if both are enabled.
llvm-svn: 162454
2012-08-23 18:14:30 +00:00
Dmitri Gribenko 65340a69e1 Fix a bunch of -Wdocumentation warnings.
llvm-svn: 162446
2012-08-23 16:54:08 +00:00
Eric Christopher a876b8243e Typo.
llvm-svn: 162438
2012-08-23 07:32:06 +00:00
Eric Christopher 3a47c3e3cd Only emit the __debug_inlined section if we're trying to be compatible
with older gdbs on darwin.

rdar://10975874

llvm-svn: 162436
2012-08-23 07:32:02 +00:00
Eric Christopher 35ceacbcc2 Make this darwin specific to try to silence the bots.
llvm-svn: 162435
2012-08-23 07:18:46 +00:00
Eric Christopher 7782618271 Emit pubtypes only when going for darwin gdb compatibility.
rdar://10393214

llvm-svn: 162434
2012-08-23 07:10:56 +00:00
Eric Christopher 6cb5594979 Filecheck-ize.
llvm-svn: 162433
2012-08-23 07:10:51 +00:00
Eric Christopher 978fbff11b Add an option for darwin gdb compatibility.
llvm-svn: 162432
2012-08-23 07:10:46 +00:00
Lang Hames 4039eb357e Make the setInst method take its MCInst parameter by reference, a la Jim's
change in r162404.

llvm-svn: 162431
2012-08-23 07:00:48 +00:00
Craig Topper f911597494 Use a switch statement instead of a bunch of if-else checks and pull out the common function call.
llvm-svn: 162428
2012-08-23 04:57:36 +00:00
Craig Topper ca698195a2 Remove unused private field to silence build warning.
llvm-svn: 162426
2012-08-23 04:45:31 +00:00
Eric Christopher c2ce00418c 80-col.
llvm-svn: 162422
2012-08-23 00:52:51 +00:00
Eric Christopher 0ef6ebc7e4 Tidy.
llvm-svn: 162421
2012-08-23 00:52:49 +00:00
Andrew Trick ae53561b0c Simplify the computeOperandLatency API.
The logic for recomputing latency based on a ScheduleDAG edge was
shady. This bypasses the problem by requiring the client to provide
operand indices. This ensures consistent use of the machine model's
API.

llvm-svn: 162420
2012-08-23 00:39:43 +00:00
Akira Hatanaka bf493942b0 Make function loadImmediate a member of MipsSEInstrInfo and change it to return
the temporary register that was used to load the immediate. Currently, it always
returns register $at, but this will change if, in the future, we decide to use 
another register.

No changes in functionality.

llvm-svn: 162417
2012-08-23 00:21:05 +00:00
Akira Hatanaka 4da9667631 Add a member of type Mips16InstrInfo/MipsSEInstrInfo to class
Mips16RegisterInfo/MipsSERegisterInfo. 

No changes in functionality.

llvm-svn: 162413
2012-08-22 23:58:53 +00:00
Ted Kremenek feb5a2384b Fix an assortment of doxygen comment mistakes found by -Wdocumentation.
llvm-svn: 162411
2012-08-22 23:49:16 +00:00
Jakob Stoklund Olesen d7b66968f9 Print out the location of expanded multiclass defs in TableGen errors.
When reporting an error for a defm, we would previously only report the
location of the outer defm, which is not always where the error is.

Now we also print the location of the expanded multiclass defs:

lib/Target/X86/X86InstrSSE.td:2902:12: error: foo
  defm ADD : basic_sse12_fp_binop_s<0x58, "add", fadd, SSE_ALU_ITINS_S>,
             ^
lib/Target/X86/X86InstrSSE.td:2801:11: note: instantiated from multiclass
  defm PD : sse12_fp_packed<opc, !strconcat(OpcodeStr, "pd"), OpNode, VR128,
            ^
lib/Target/X86/X86InstrSSE.td:194:5: note: instantiated from multiclass
    def rm : PI<opc, MRMSrcMem, (outs RC:$dst), (ins RC:$src1, x86memop:$src2),
        ^

llvm-svn: 162409
2012-08-22 23:33:58 +00:00
Jim Grosbach c72632c9e9 MCInstFragment constructor should take by-reference MCInst.
The MCInst is immediately passed to the copy-constructor for local
storage, so there's no need for the parameter itself to be by-value.

llvm-svn: 162404
2012-08-22 22:19:40 +00:00
Daniel Dunbar df38adae0f darwin/cross-build: Unset SDKROOT when building BuildTools.
llvm-svn: 162402
2012-08-22 22:01:01 +00:00
Benjamin Kramer e07728b936 SimplifyLibCalls: Give all safely-shrinkable libcalls the same treatment.
llvm-svn: 162383
2012-08-22 19:39:15 +00:00
Chad Rosier cf172e5e28 [ms-inline asm] Avoid a false positive assertion
Assertion failed: (Start.isValid() == End.isValid() && "Start and end should 
either both be valid or both be invalid!")

when parsing inline asm.  SMLoc assumes that the first char * in the source is
invalid.  However, when parsing an inline asm the mnemonic is at this location.
I don't want to change SMLoc, so use a trivial workaround.

llvm-svn: 162381
2012-08-22 19:14:29 +00:00
Chad Rosier 1df1fb511f Whitespace.
llvm-svn: 162370
2012-08-22 17:34:11 +00:00
Chad Rosier 671dc096ae Add test case for r162368.
llvm-svn: 162369
2012-08-22 17:31:04 +00:00
Chad Rosier 0122909d95 Add a few float shrinking optimizations to SimplifyLibCalls. Unsafe
optimizations are guarded by the -enable-double-float-shrink LLVM option.
Last bit of PR13574.  Patch by Weiming Zhao <weimingz@codeaurora.org>.

llvm-svn: 162368
2012-08-22 17:22:33 +00:00
David Blaikie c8c2920a3f Tidy up a few more uses of MF.getFunction()->getName().
Based on CR feedback from r162301 and Craig Topper's refactoring in r162347
here are a few other places that could use the same API (& in one instance drop
a Function.h dependency).

llvm-svn: 162367
2012-08-22 17:18:53 +00:00
Chad Rosier b2f5c1cdbb Add a new helper function, AddOpt(F1, F1, Opt), as part of PR13574. No
functional change intended.  Patch by Weiming Zhao <weimingz@codeaurora.org>.

llvm-svn: 162363
2012-08-22 16:52:57 +00:00
Benjamin Kramer f29db275b2 Reduce duplicated hash map lookups.
llvm-svn: 162362
2012-08-22 15:37:57 +00:00
Stepan Dyatkovskiy 99120e04be Rejected 169195. As Duncan commented, bitcasting to proper type is wrong approach. We need to insert some valid TRANCATE node here.
llvm-svn: 162354
2012-08-22 09:33:55 +00:00