|  | Commit message (Collapse) | Author | Age | Files | Lines | 
|---|
| | 
| 
| 
| 
| 
| | Patch by Alp Toker.
llvm-svn: 191757 | 
| | 
| 
| 
| | llvm-svn: 191724 | 
| | 
| 
| 
| 
| 
| | into the debug_ranges section.
llvm-svn: 191721 | 
| | 
| 
| 
| | llvm-svn: 191720 | 
| | 
| 
| 
| 
| 
| 
| | SEC_OFFSET from the beginning of the section so go ahead and emit
a label at the beginning of each one.
llvm-svn: 191710 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | For targets that have instruction itineraries this means no change. Targets
that move over to the new schedule model will use be able the new schedule
module for instruction latencies in the if-converter (the logic is such that if
there is no itineary we will use the new sched model for the latencies).
Before, we queried "TTI->getInstructionLatency()" for the instruction latency
and the extra prediction cost. Now, we query the TargetSchedule abstraction for
the instruction latency and TargetInstrInfo for the extra predictation cost. The
TargetSchedule abstraction will internally call "TTI->getInstructionLatency" if
an itinerary exists, otherwise it will use the new schedule model.
ATTENTION: Out of tree targets!
(I will also send out an email later to LLVMDev)
This means, if your target implements
 unsigned getInstrLatency(const InstrItineraryData *ItinData,
                          const MachineInstr *MI,
                          unsigned *PredCost);
and returns a value for "PredCost", you now also need to implement
 unsigned getPredictationCost(const MachineInstr *MI);
(if your target uses the IfConversion.cpp pass)
radar://15077010
llvm-svn: 191671 | 
| | 
| 
| 
| 
| 
| 
| | SDNode destructors are never called. As an optimization use AtomicSDNode's
internal storage if we have a small number of operands.
llvm-svn: 191636 | 
| | 
| 
| 
| | llvm-svn: 191610 | 
| | 
| 
| 
| | llvm-svn: 191604 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | SelectionDAG will now attempt to inverse an illegal conditon in order to
find a legal one and if that doesn't work, it will attempt to swap the
operands using the inverted condition.
There are no new test cases for this, but a nubmer of the existing R600
tests hit this path.
llvm-svn: 191602 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | This is useful for targets like R600, which only support GT, GE, NE, and EQ
condition codes as it removes the need to handle unsupported condition
codes in target specific code.
There are no tests with this commit, but R600 has been updated to take
advantage of this new feature, so its existing selectcc tests are now
testing the swapped operands path.
llvm-svn: 191601 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | Interpreting the results of this function is not very intuitive, so I
cleaned it up to make it more clear whether or not a SETCC op was
legalized and how it was legalized (either by swapping LHS and RHS or
replacing with AND/OR).
This patch does change functionality in the LHS and RHS swapping case,
but unfortunately there are no in-tree tests for this.  However, this
patch is a prerequisite for R600 to take advantage of the LHS and RHS
swapping, so tests will be added in subsequent commits.
llvm-svn: 191600 | 
| | 
| 
| 
| | llvm-svn: 191582 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | into StackProtector.h and StackProtector.cpp.
No functionality change.  Future patches will add analysis which will be used
in other passes (PEI, StackSlot).  The end goal is to support ssp-strong stack
layout rules.
WIP.
Differential Revision: http://llvm-reviews.chandlerc.com/D1521
llvm-svn: 191570 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| | This change fixes the problem reported in pr17380 and re-add the dagcombine 
transformation ensuring that the value types are always legal if the 
transformation is triggered after Legalization took place.
Added the test case from pr17380.
llvm-svn: 191509 | 
| | 
| 
| 
| | llvm-svn: 191438 | 
| | 
| 
| 
| | llvm-svn: 191432 | 
| | 
| 
| 
| | llvm-svn: 191431 | 
| | 
| 
| 
| 
| 
| | Patch by Artyom Skrobov.
llvm-svn: 191428 | 
| | 
| 
| 
| | llvm-svn: 191423 | 
| | 
| 
| 
| | llvm-svn: 191422 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | (shl (zext (shr A, X)), X) => (zext (shl (shr A, X), X)).
The rule only triggers when there are no other uses of the
zext to avoid materializing more instructions.
This helps the DAGCombiner understand that the shl/shr
sequence can then be converted into an and instruction.
llvm-svn: 191393 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | Ideally, the machinel model is added at the time the instructions are
defined. But many instructions in X86InstrSSE.td still need a model.
Without this workaround the scheduler asserts because x86 already has
itinerary classes for these instructions, indicating they should be
modeled by the scheduler. Since we use the new machine model for other
instructions, it expects a new machine model for these too.
llvm-svn: 191391 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | PEI inserts a save/restore sequence for the link register, according to the
information it gets from the MachineRegisterInfo.
MachineRegisterInfo is populated by the VirtRegMap pass.
This pass was not aware of noreturn calls and was registering the definitions of
these calls the same way as regular operations.
Modify VirtRegPass so that it does not set the isPhysRegUsed information for
registers only defined by noreturn calls.
The rational is that a noreturn call is the "last instruction" of the program
(if it returns the behavior is undefined), so everything that is defined by it
cannot be used and will not interfere with anything else. Therefore, it is
pointless to account for then.
llvm-svn: 191349 | 
| | 
| 
| 
| 
| 
| | PR17338.
llvm-svn: 191337 | 
| | 
| 
| 
| | llvm-svn: 191312 | 
| | 
| 
| 
| 
| 
| | No functionality change, lots of indentation changes.
llvm-svn: 191303 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| | Patch by Ana Pazos.
1.Added support for v1ix and v1fx types.
2.Added Scalar Pairwise Reduce instructions.
3.Added initial implementation of Scalar Arithmetic instructions.
llvm-svn: 191263 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | sequence.
Sometimes a copy from a vreg -> vreg sneaks into the middle of a terminator
sequence. It is safe to slice this into the stack protector success bb.
This fixes PR16979.
llvm-svn: 191260 | 
| | 
| 
| 
| | llvm-svn: 191257 | 
| | 
| 
| 
| 
| 
| | checking patch until we get full dumping support.
llvm-svn: 191239 | 
| | 
| 
| 
| | llvm-svn: 191236 | 
| | 
| 
| 
| | llvm-svn: 191235 | 
| | 
| 
| 
| | llvm-svn: 191226 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | a) Make sure we are emitting the correct section in our section labels
when we begin the module.
b) Make sure we are emitting the correct pubtypes section in the
presence of gnu pubtypes.
c) For C++ struct, union, class, and enumeration types are default
external.
llvm-svn: 191225 | 
| | 
| 
| 
| | llvm-svn: 191214 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| | The size of common symbols is now tracked correctly, so they can be listed in the arange section without needing knowledge of other following symbols.
.comm (and .lcomm) do not indicate to the system assembler any particular section to use, so we have to treat them as having no section.
Test case update to account for this.
llvm-svn: 191210 | 
| | 
| 
| 
| 
| 
| 
| 
| | This makes using array_pod_sort significantly safer. The implementation relies
on function pointer casting but that should be safe as we're dealing with void*
here.
llvm-svn: 191175 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | Previously, the DAGISel function WalkChainUsers was spotting that it
had entered already-selected territory by whether a node was a
MachineNode (amongst other things). Since it's fairly common practice
to insert MachineNodes during ISelLowering, this was not the correct
check.
Looking around, it seems that other nodes get their NodeId set to -1
upon selection, so this makes sure the same thing happens to all
MachineNodes and uses that characteristic to determine whether we
should stop looking for a loop during selection.
This should fix PR15840.
llvm-svn: 191165 | 
| | 
| 
| 
| 
| 
| 
| 
| | splitting too."
This reverts commit r191130.
llvm-svn: 191138 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | The Type Legalizer recognizes that VSELECT needs to be split, because the type
is to wide for the given target. The same does not always apply to SETCC,
because less space is required to encode the result of a comparison. As a result
VSELECT is split and SETCC is unrolled into scalar comparisons.
This commit fixes the issue by checking for VSELECT-SETCC patterns in the DAG
Combiner. If a matching pattern is found, then the result mask of SETCC is
promoted to the expected vector mask for the given target. This mask has usually
te same size as the VSELECT return type (except for Intel KNL). Now the type
legalizer will split both VSELECT and SETCC.
This allows the following X86 DAG Combine code to sucessfully detect the MIN/MAX
pattern. This fixes PR16695, PR17002, and <rdar://problem/14594431>.
llvm-svn: 191130 | 
| | 
| 
| 
| 
| 
| 
| | info finalization to greatly reduce the number of fixups that the
assembler has to handle in order to improve compile time.
llvm-svn: 191119 | 
| | 
| 
| 
| 
| 
| | to further work.
llvm-svn: 191113 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | interface.
The global registry is used to allow command line override of the
scheduler selection, but does not work well as the normal selection
API. For example, the same LLVM process should be able to target
multiple targets or subtargets.
llvm-svn: 191071 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | for easy llvm::formating
This was previously invoking UB by passing a user-defined type to
format. Thanks to Jordan Rose for pointing this out.
llvm-svn: 191060 | 
| | 
| 
| 
| 
| 
| | These violations were introduced in r191049
llvm-svn: 191059 | 
| | 
| 
| 
| | llvm-svn: 191052 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| | This was an experimental scheduler a year ago. It's now used by
several subtargets, both in-order and out-of-order, and it
is about to be enabled by default for x86 and armv7. It will be the
new GenericScheduler for subtargets that don't provide their own
SchedulingStrategy.
llvm-svn: 191051 | 
| | 
| 
| 
| | llvm-svn: 191050 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | C-like languages promote types like unsigned short to unsigned int before
performing an arithmetic operation. Currently the rotate matcher in the
DAGCombiner does not consider this situation.
This commit extends the DAGCombiner in the way that the pattern
(or (shl ([az]ext x), (*ext y)), (srl ([az]ext x), (*ext (sub 32, y))))
is folded into
([az]ext (rotl x, y))
The matching is restricted to aext and zext because in this cases the upper
bits are either undefined or known. Test case is included.
This fixes PR16726.
llvm-svn: 191049 |