1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
llvm-mirror/include/llvm/Support
Arnold Schwaighofer 83cedfffb0 PatternMatch: Matcher for (un)ordered floating point min/max
Add support for matching 'ordered' and 'unordered' floating point min/max
constructs.

In LLVM we can express min/max functions as a combination of compare and select.
We have support for matching such constructs for integers but not for floating
point. In floating point math there is no total order because of the presence of
'NaN'. Therefore, we have to be careful to preserve the original fcmp semantics
when interpreting floating point compare select combinations as a minimum or
maximum function. The resulting 'ordered/unordered' floating point maximum
function has to select the same value as the select/fcmp combination it is based
on.

 ordered_max(x,y)   = max(x,y) iff x and y are not NaN, y otherwise
 unordered_max(x,y) = max(x,y) iff x and y are not NaN, x otherwise
 ordered_min(x,y)   = min(x,y) iff x and y are not NaN, y otherwise
 unordered_min(x,y) = min(x,y) iff x and y are not NaN, x otherwise

This matches the behavior of the underlying select(fcmp(olt/ult/.., L, R), L, R)
construct.

Any code using this predicate has to preserve this semantics.

A follow-up patch will use this to implement floating point min/max reductions
in the vectorizer.

radar://13723044

llvm-svn: 181143
2013-05-05 01:54:46 +00:00
..
AIXDataTypesFix.h
AlignOf.h Incrase the number of parameters for AlignedCharArrayUnion. 2013-01-09 10:39:16 +00:00
Allocator.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
ArrayRecycler.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
Atomic.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
BlockFrequency.h
BranchProbability.h
CallSite.h Remove unneeded #includes. 2013-03-18 23:33:44 +00:00
Capacity.h
Casting.h Cleanup the simplify_type implementation. 2013-03-27 16:43:11 +00:00
CBindingWrapping.h Fix file header comment. 2013-05-01 21:01:06 +00:00
CFG.h Seciton 24.2.2 of the C++ standard, [iterator.iterators], Table 106 2013-03-28 15:47:50 +00:00
circular_raw_ostream.h Use empty parens for empty function parameter list instead of '(void)'. 2012-11-15 16:51:49 +00:00
CodeGen.h This exposes more MCJIT options via the C API: 2013-05-01 22:58:00 +00:00
COFF.h Implements low-level object file format specific output for COFF and 2013-04-03 18:31:38 +00:00
CommandLine.h Generalize my previous fix for -print-options. 2013-03-06 19:04:56 +00:00
Compiler.h Introduce LLVM_STATIC_ASSERT macro, which expands to C/C++'s static_assert on compilers which support it. 2013-03-22 03:10:51 +00:00
Compression.h Add basic zlib support to LLVM. This would allow to use compression/uncompression in selected LLVM tools. 2013-04-23 08:28:39 +00:00
ConstantFolder.h Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
ConstantRange.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
ConvertUTF.h llvm-gcc -pedantic warns about C++ comments in C90 mode even if they're 2013-02-13 22:45:52 +00:00
CrashRecoveryContext.h
DataExtractor.h Be consistent about the field name - AddressSize, not PointerSize. Add 2013-02-05 23:26:02 +00:00
DataFlow.h Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
DataStream.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
DataTypes.h.cmake Remove OpenBSD defines: 2012-08-08 18:37:39 +00:00
DataTypes.h.in Remove OpenBSD defines: 2012-08-08 18:37:39 +00:00
Debug.h Typos. 2012-07-27 21:41:59 +00:00
DebugLoc.h Remove trailing spaces. 2013-03-18 23:04:30 +00:00
Disassembler.h
DOTGraphTraits.h ScheduleDAG: colorize the DOT graph and improve formatting. 2013-01-25 07:45:25 +00:00
Dwarf.h Revert "Update the version of dwarf we say we're emitting to at least 3." 2013-04-10 21:45:07 +00:00
DynamicLibrary.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
ELF.h [SystemZ] Add ELF relocation support 2013-05-03 11:11:15 +00:00
Endian.h Make the host endianness check an integer constant expression. 2013-04-15 14:44:24 +00:00
Errno.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
ErrorHandling.h Add a boolean parameter to the llvm::report_fatal_error() function to indicated 2013-03-27 18:27:54 +00:00
ErrorOr.h [Support][ErrorOr] Add support for implicit conversion from error code/condition enums. 2013-02-28 01:44:26 +00:00
FEnv.h Refine fenv.h handling: check if the desired macros exist, before using 2013-03-25 13:13:33 +00:00
FileOutputBuffer.h [Support] Make FileOutputBuffer work on Windows. 2012-12-03 22:09:52 +00:00
FileSystem.h [Support] Fix lifetime of file descriptors when using MemoryBuffer. 2013-03-14 00:20:10 +00:00
FileUtilities.h
Format.h Fix Doxygen issues: 2012-09-14 14:57:36 +00:00
FormattedStream.h unindent the file to follow coding standards, change class doc comment 2013-04-01 23:00:01 +00:00
GCOV.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
GetElementPtrTypeIterator.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
GraphWriter.h ScheduleDAG: colorize the DOT graph and improve formatting. 2013-01-25 07:45:25 +00:00
Host.h Fix silly typo that broke big endian hosts. 2013-04-15 20:13:59 +00:00
IncludeFile.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
InstIterator.h Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
IntegersSubset.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
IntegersSubsetMapping.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
LeakDetector.h
LEB128.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
LICENSE.TXT
Locale.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
LockFileManager.h Fix a race condition in the lock-file manager: once the lock file is 2013-01-10 02:01:35 +00:00
MachO.h Remove tabs. 2012-07-19 00:01:00 +00:00
ManagedStatic.h
MathExtras.h Suppressing MSVC warnings; patch thanks to Peng Cheng! 2013-02-27 18:25:41 +00:00
Memory.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
MemoryBuffer.h This patch breaks up Wrap.h so that it does not have to include all of 2013-05-01 20:59:00 +00:00
MemoryObject.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
Mutex.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
MutexGuard.h Mark unimplemented copy constructors and copy assignment operators as LLVM_DELETED_FUNCTION. 2012-09-17 06:31:17 +00:00
NoFolder.h Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
OutputBuffer.h
PassNameParser.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
Path.h
PathV1.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
PathV2.h Fix a doxygen issue: these examples are supposed to be displayed preformatted. 2012-09-13 11:42:30 +00:00
PatternMatch.h PatternMatch: Matcher for (un)ordered floating point min/max 2013-05-05 01:54:46 +00:00
PluginLoader.h
PointerLikeTypeTraits.h
PredIteratorCache.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
PrettyStackTrace.h Add LLVM_OVERRIDE to methods that override their base classes. 2012-09-23 02:12:10 +00:00
Process.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
Program.h Add a function to check if an argument list is too long. 2013-04-11 14:06:34 +00:00
raw_os_ostream.h Add LLVM_OVERRIDE to methods that override their base classes. 2012-09-23 02:12:10 +00:00
raw_ostream.h Use LLVM_DELETED_FUNCTION rather than '// do not implement' comments. 2013-02-18 23:11:17 +00:00
Recycler.h Special case Recycler::clear(BumpPtrAllocator). 2013-01-04 22:35:45 +00:00
RecyclingAllocator.h
Regex.h Add backreference matching capabilities to Support/Regex, with 2012-11-28 19:00:02 +00:00
Registry.h Mark unimplemented copy constructors and copy assignment operators as LLVM_DELETED_FUNCTION. 2012-09-17 06:31:17 +00:00
RegistryParser.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
RWMutex.h Use LLVM_DELETED_FUNCTION for copy constructors and copy assignment operators that aren't implemented. 2012-09-16 21:37:56 +00:00
SaveAndRestore.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
Signals.h Signal.h: Add <cstdio> for FILE*, since r171989. 2013-01-10 05:23:59 +00:00
SMLoc.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
Solaris.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
SourceMgr.h Add ArrayRef constructor from None, and do the cleanups that this constructor enables 2013-05-05 00:40:33 +00:00
StreamableMemoryObject.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
StringPool.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
SwapByteOrder.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
system_error.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
SystemUtils.h
TargetFolder.h Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
TargetRegistry.h Remove MCTargetAsmLexer and its derived classes now that edis, 2012-12-20 14:43:30 +00:00
TargetSelect.h Add InitializeNativeTargetDisassembler function. 2012-03-26 21:56:56 +00:00
Threading.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
ThreadLocal.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
Timer.h Slight cosmetic fixes 2013-02-26 18:05:31 +00:00
TimeValue.h Fix initialization-order bug in llvm::Support::TimeValue. TimeValue::now() is explicitly called during module initialization of lib/Support/Process.cpp. It reads the field of global object PosixZeroTime, which is not guaranteed to be initialized at this point. Found by AddressSanitizer with -fsanitize=init-order option. 2013-02-19 11:35:39 +00:00
ToolOutputFile.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
type_traits.h Cleanup the simplify_type implementation. 2013-03-27 16:43:11 +00:00
Valgrind.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
ValueHandle.h Cleanup the simplify_type implementation. 2013-03-27 16:43:11 +00:00
Watchdog.h Add a new watchdog timer interface. The interface does not permit handling timeouts, so 2013-03-26 01:27:52 +00:00
Win64EH.h Implements low-level object file format specific output for COFF and 2013-04-03 18:31:38 +00:00
YAMLParser.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
YAMLTraits.h Remove redundant 'llvm::' qualifications 2013-01-13 16:01:15 +00:00