Factor MI-Sched in preparation for post-ra scheduling support.

Factor the MachineFunctionPass into MachineSchedulerBase.

Split the DAG class into ScheduleDAGMI and SchedulerDAGMILive.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198119 91177308-0d34-0410-b5e6-96231b3b80d8
Stub out a PostMachineScheduler pass.

Placeholder and boilerplate for a PostRA MachineScheduler pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198120 91177308-0d34-0410-b5e6-96231b3b80d8
Move the PostRA scheduler's fixupKills function for reuse.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198121 91177308-0d34-0410-b5e6-96231b3b80d8
Add a PostMachineScheduler pass with generic implementation.

PostGenericScheduler uses either the new machine model or the hazard
checker for top-down scheduling. Most of the infrastructure for PreRA
machine scheduling is reused.

With a some tuning, this should allow MachineScheduler to be default
for all ARM targets, including cortex-A9, using the new machine
model. Likewise, with additional tuning, it should be able to replace
PostRAScheduler for all targets.

The PostMachineScheduler pass does not currently run the
AntiDepBreaker. There is less need for it on targets that are already
running preRA MachineScheduler. I want to prove it's necessary before
committing to the maintenance burden.

The PostMachineScheduler also currently removes kill flags and adds
them all back later. This is a bit ridiculous. I'd prefer passes to
directly use a liveness utility than rely on flags.

A test case that enables this scheduler will be included in a
subsequent checkin that updates the A9 model.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198122 91177308-0d34-0410-b5e6-96231b3b80d8
The Cortex-A9 machine model is incomplete. Mark it as such.

Many vector operations never had itineraries. Since the new machine
model was a mapping from existing itinerary classes, we don't have a
model for these. We still want to migrate A9 even though no one has
invested in a complete model, so mark it incomplete to avoid the
scheduler asserting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198123 91177308-0d34-0410-b5e6-96231b3b80d8
Added debugging options: -misched-only-func/block

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198124 91177308-0d34-0410-b5e6-96231b3b80d8
New machine model for cortex-a9. Schedule for resources and latency.

Schedule more conservatively to account for stalls on floating point
resources and latency. Use the AGU resource to model latency stalls
since it's shared between FP and LD/ST instructions. This might not be
completely accurate but should work well in practice.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198125 91177308-0d34-0410-b5e6-96231b3b80d8
Uninitialized variable (in never taken path) after factoring.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198131 91177308-0d34-0410-b5e6-96231b3b80d8
ARM IAS: handle errors more appropriately

Directive parsers must return false if the target assembler is interested in
handling the directive.  The Error member function returns true always.  Using
the 'return Error()' pattern would incorrectly indicate to the general parser
that the target was not interested in the directive, when in reality it simply
encountered a badly formed directive or some other error.  This corrects the
behaviour to ensure that the parser behaves appropriately.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198132 91177308-0d34-0410-b5e6-96231b3b80d8
CodeGen: silence a C++11 feature warning

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198133 91177308-0d34-0410-b5e6-96231b3b80d8
Remove windows newlines.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198135 91177308-0d34-0410-b5e6-96231b3b80d8
EXPORTED_SYMBOL_FILE support for cmake

The cmake build didn't support EXPORTED_SYMBOL_FILE. Instead, it had a
Windows-only implementation in tools/lto/CMakeLists.txt, a linux-only
implementation in tools/gold/CMakeLists.txt, and a darwin-only implementation
in tools/clang/tools/libclang/CMakeLists.txt.

This attempts to consolidate these one-offs into a single place. Clients can now
just set LLVM_EXPORTED_SYMBOL_FILE and things (hopefully) Just Work, like in
the make build.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198136 91177308-0d34-0410-b5e6-96231b3b80d8
Try to fix linux build after r198136.

$ needs to be written $$ in makefiles, but not in cmakefiles.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198137 91177308-0d34-0410-b5e6-96231b3b80d8
Try to fix windows build after r198136.

`type` can't read from stdin.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198138 91177308-0d34-0410-b5e6-96231b3b80d8
Use `${CMAKE_COMMAND}` instead of `cmake`.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198139 91177308-0d34-0410-b5e6-96231b3b80d8
Try to fix windows build more after r198136.

The command that cmd.exe is complaining about is:
cmd.exe /c cd /D C:\bb-win7\cmake-clang-i686-mingw32\build\tools\lto && cmake -E echo EXPORTS > symbol.def && type C:/bb-win7/cmake-clang-i686-mingw32/llvm-project/llvm/tools/lto/lto.exports >> symbol.def

Maybe quoting the filename helps.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198140 91177308-0d34-0410-b5e6-96231b3b80d8
Define LLVM_MSC_PREREQ() macro to simplify _MSC_VER checks

Includes documentation mapping MSC version numbers to the more familiar Visual
Studio releases.

Cleanup only to simplify upcoming C++11 / MSVC 2013 changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198141 91177308-0d34-0410-b5e6-96231b3b80d8
Enable deleted functions and explicit conversions in MSVC 2013

Also prospectively enable static_assert as the documentation suggests it's been
available since MSVC 2010. Let's see if the build servers agree.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198142 91177308-0d34-0410-b5e6-96231b3b80d8
Another windows build fix attempt after r198136.

The current quoting is stripped by cmake, try quoting more.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198143 91177308-0d34-0410-b5e6-96231b3b80d8
Switch from EVT to MVT in more of the x86 instruction lowering code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198144 91177308-0d34-0410-b5e6-96231b3b80d8