1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/lib
David Majnemer 93803262f4 [X86] Add intrinsics for reading and writing to the flags register
LLVM's targets need to know if stack pointer adjustments occur after the
prologue.  This is needed to correctly determine if the red-zone is
appropriate to use or if a frame pointer is required.

Normally, LLVM can figure this out very precisely by reasoning about the
contents of the MachineFunction.  There is an interesting corner case:
inline assembly.

The vast majority of inline assembly which will perform a push or pop is
done so to pair up with pushf or popf as appropriate.  Unfortunately,
this inline assembly doesn't mark the stack pointer as clobbered
because, well, it isn't.  The stack pointer is decremented and then
immediately incremented.  Because of this, LLVM was changed in r256456
to conservatively assume that inline assembly contain a sequence of
stack operations.  This is unfortunate because the vast majority of
inline assembly will not end up manipulating the stack pointer in any
way at all.

Instead, let's provide a more principled solution: an intrinsic.
FWIW, other compilers (MSVC and GCC among them) also provide this
functionality as an intrinsic.

llvm-svn: 256685
2016-01-01 06:50:01 +00:00
..
Analysis [ValueTracking] fix bug computing isKnownToBeAPowerOfTwo() with arithmetic shift right (PR25900) 2015-12-30 22:40:52 +00:00
AsmParser Implemented Support of IA interrupt and exception handlers: 2015-12-21 14:07:14 +00:00
Bitcode Ensure MDNode used as key in metadata linking map cannot be RAUWed 2015-12-30 19:32:24 +00:00
CodeGen don't repeat function names in comments; NFC 2015-12-29 22:11:50 +00:00
DebugInfo Remove unused constants from TypeTableBuilder.cpp. 2015-12-24 19:15:56 +00:00
ExecutionEngine Delete APIs that have been deprecated since 2010. 2015-12-19 21:42:07 +00:00
Fuzzer [libFuzzer] add AFL-style dictionary for C++, remove the old file with tokens 2015-12-22 01:50:51 +00:00
IR [ThinLTO] Rename variables used in metadata linking (NFC) 2015-12-30 21:13:55 +00:00
IRReader [ThinLTO] Metadata linking for imported functions 2015-12-17 17:14:09 +00:00
LibDriver
LineEditor
Linker [ThinLTO] Rename variables used in metadata linking (NFC) 2015-12-30 21:13:55 +00:00
LTO Rename variables to reflect linker split (NFC) 2015-12-18 19:28:59 +00:00
MC [ptr-traits] Provide a real MCFragment address for the sentinel instead 2015-12-29 09:32:18 +00:00
Object Handle archives with paths in the names. 2015-12-18 16:07:17 +00:00
Option Convert Arg, ArgList, and Option to dump() to dbgs() rather than errs(). 2015-12-18 18:55:26 +00:00
Passes [attrs] Extract the pure inference of function attributes into 2015-12-27 08:41:34 +00:00
ProfileData [PGO]: Implement Func PGO name string compression 2015-12-31 07:57:16 +00:00
Support Refactor: Simplify boolean conditional return statements in llvm/lib/Support 2015-12-28 15:46:15 +00:00
TableGen
Target [X86] Add intrinsics for reading and writing to the flags register 2016-01-01 06:50:01 +00:00
Transforms [LibCallSimplifier] propagate FMF when shrinking binary calls 2015-12-31 23:40:59 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile