Граф коммитов

9 Коммитов

Автор SHA1 Сообщение Дата
Greg Roth 0db66a3b67
Give Asdouble some love (i64 cast and folding) (#3666)
The type of the overload allowed i64 and refused casts. As a result, if
an i64 value was used, invalid code is produced leading to asserts or
validation errors.

Added support for folding when the params of asdouble are constants
2021-05-27 15:41:43 -07:00
Tex Riddell 7c9e487afd
Implement IsHelperLane() (#3382) 2021-01-22 12:45:18 -08:00
Xiang Li 0bd0afe693
const folding on dxil.convergent.marker. (#2523) 2019-10-16 16:56:03 -07:00
Xiang Li 4df08af7c0
Move DxilModule into DXIL directory. (#1599)
* Move DxilModule into DXIL directory.
2018-10-16 00:28:35 -07:00
Greg Roth d27307905c Make correct/consistent include capitalization (#1269)
Several #included files were capitalized incorrectly in the case of
files pertaining to the project, or inconsistently in the case of
Windows headers which are typically only relevant where capitalization
doesn't matter. In spite of that, consistent capitalization can be
useful for cross platform stubbing purposes.

This corrects capitalization of a few Dxil* headers and forces
capitalization of Windows-specific headers to be consistent with
the overwhelming majority of other cases.

No functional change, just cross-platform facilitation
2018-05-10 10:47:52 -07:00
David Peixotto 022eb5717f Add hooks for constant folding extensions (#209)
This commit adds placeholder hooks to support constant folding of
extensions.  They are defined in a separate file to make it easy to merge
changes or link in other versions. There should be no upstream changes to
these definitions.
2017-04-13 15:04:14 -07:00
David Peixotto b0fd2d3949 Use opcode class to guide constant folding possibilities (#191)
This change modifies dxil constant folding to use the opcode class when
deciding if a dxil function can be constant folded. We now require a
DxilModule to be available when constant folding dxil functions.

To ensure that the dxil module is available we add a new pass that loads a
dxil module from metadata if it does not exist. We use the new pass in the
dxopt tests for constant folding.
2017-04-06 17:42:42 -07:00
David Peixotto deec58372a Ensure the cached Function->OpCodeClass map is updated (#186)
* Ensure the cached Function->OpCodeClass map is updated

The original goal of this change was to use opcode class for deciding when we
can perform constant folding on a function.

We maintain a mapping from Function* to OpCodeClass inside the OP class.
We wanted to use this map in constant folding to decide if we can constant
fold a function to avoid string comparison on the function names.

However, it turns out that the DxilModule is not always available during
constant folding of dxil calls so we cannot use the map inside of OP. The
change contains a few bug fixes and improvements that came out of trying
to get opcode class working inside constant folding.

  1. Use opcode class in dxil constant folding where possible.
  2. Make sure the opcode cache is refreshed properly.
  3. Remove 64-bit test for bfi.
  4. Add equality comparison for the ShaderModel class.

When switching to use the opcode class for constant folding, we discovered
that our test for 64-bit bfi is invalid. There is no 64-bit overload for
bfi in dxil, so the test we had written was not legal dxil. This change
removes the 64-bit test for bfi constant prop.
2017-04-06 13:48:27 -07:00
David Peixotto ae69cf0a58 Add constant folding for dxil intrinsics (#179)
This commit adds the ability to constant fold dxil intrinsics when
all inputs are constant. We reuse the llvm constant folding
infrastructure and add special cases for calls to dxil intrinsics.
2017-04-04 09:15:19 -07:00