[llvm-commits] Patch for Bug7696

Chris Lattner clattner at apple.com
Mon Nov 29 15:10:09 PST 2010


On Nov 23, 2010, at 1:39 PM, Villmow, Micah wrote:

> Reposting bug report here, any chance that it can get reviewed?
> Patch that adds a boolean where a backend can specify whether to disable
> certain optimizations because jumps are expensive.

Hi Micah,

The patch looks ok, except for some minor issues:

+  void setSelectIsExpensive(bool isExpensive = true) { 
+	  SelectIsExpensive = isExpensive; 

Please avoid tabs.

+  /// isJumpExpensive() - Return true if true if Flow Control is an
+  /// expensive operation that should be avoided

Please end the comment with a .

+  /// JumpIsExpensive - Tells the code generator not to expand operations
+  /// into sequences that increase the amount of flow control if possible
+  void setJumpIsExpensive(bool isExpensive = true) {
+	  JumpIsExpensive = isExpensive;

likewise ^2

+  /// JumpIsExpensive - Tells the code generator that it shouldn't
+  /// generate extra flow control instructions and should attempt to 
+  /// combine flow control instructions via predication

end comment with a .

I was planning to just apply this for you and tweak it, but your patch format isn't accepted by the 'patch' command.

-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20101129/073bd0cd/attachment.html>


More information about the llvm-commits mailing list