Files
rocm-systems/rocclr/compiler/lib
foreman b49c9b62b0 P4 to Git Change 1158377 by smekhano@stas-rampitec-hsa on 2015/06/05 14:01:35
ECR #333753 - HSA HLC: fix for cannot select __hsail_memfence intrinsic under -O0
	Fix for bug 10808.

	We have missed always inliner pass on runtime only for -O0 build. aoc2 and opt.exe run it, but conformance binary itself does not.
	As a result a set of always_inline functions was not inlined and we cannot lower __hsail_memfence call which should accept only immediate arguments,
	where we are passing call arguments if it is not inlined.

	The fix ensures we are running at either of two inliner always if building for GPU. Under -O0 that is always inliner pass.
	In addition three helper functions in the library were marked as always_inline to ensure these are also inlined into atomic_work_item_fence() and thus
	supply immediate arguments into __hsail_memfence call. The dialect we are using in clang to build the library does not provide inlining of a "static inline"
	functions, so an additional attribute was needed.

	Also the fix unifies -O0 inliner invocation code for offline opt.exe and complib.

	Additionally fixed the complib bug, under -O0 OptLevel::setup() extis early, so does not change HLC_Disable_Amd_Inline_All variable.
	This variable contains the value left after blit kernels compilation. Added corresponding setup code to GPUO0OptLevel::optimize().

	In a long run we should call AMDPassManagerBuilder under -O0 as well and handle all that logic there.

	Testing: test_c11_atomics atomic_fence -O0, pipes -O0, smoke, precheckin, ocl_features
	Reviewed by Brian Sumner, Matthew Arsenalut and Evgeny Mankov

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/opt_level.cpp#27 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/tools/opt/opt.cpp#70 edit
... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/misc/atomicWorkItemFence.cl#9 edit
2015-06-05 14:12:54 -04:00
..
2014-07-04 16:17:05 -04:00
2014-07-04 16:17:05 -04:00
2014-07-04 16:17:05 -04:00